This discussion is archived
4 Replies Latest reply: Nov 6, 2012 3:43 AM by user533671 RSS

Journal Posting

user533671 Newbie
Currently Being Moderated
Hi,

I'm new to Finance Module. I tried Journal Posting from back end.
DECLARE
   x_user_id             NUMBER;
   x_sob_id              NUMBER;
   x_coa_id              NUMBER;
   x_user_source_name    VARCHAR2 (80);
   x_source_name         VARCHAR2 (30);
   x_appl_id             VARCHAR2 (50);
   x_resp_id             VARCHAR2 (50);
   x_summary_flag        VARCHAR2 (1)    := 'N';
   x_conc_id             NUMBER;
   x_posting_run_id      NUMBER;
   x_access_set_id       NUMBER;
   x_req_return_status   BOOLEAN;
   err_msg               VARCHAR2 (2000);
BEGIN
   fnd_message.CLEAR;

   SELECT user_id
     INTO x_user_id
     FROM fnd_user
    WHERE user_name = 'OPERATIONS';

   SELECT application_id
     INTO x_appl_id
     FROM fnd_application
    WHERE application_short_name = 'SQLGL';

   SELECT responsibility_id
     INTO x_resp_id
     FROM fnd_application fa, fnd_responsibility_tl fr
    WHERE fa.application_short_name = 'SQLGL'
      AND fa.application_id = fr.application_id
      AND fr.responsibility_name = 'General Ledger, Vision Operations (USA)';

   fnd_global.apps_initialize (x_user_id, x_resp_id, x_appl_id);

   SELECT set_of_books_id, chart_of_accounts_id
     INTO x_sob_id, x_coa_id
     FROM gl_sets_of_books
    WHERE short_name = 'Vision Operations';

   SELECT gl_je_posting_s.NEXTVAL
     INTO x_posting_run_id
     FROM DUAL;

   SELECT gl_access_sets_s.NEXTVAL
     INTO x_access_set_id
     FROM DUAL;

   x_conc_id :=
      fnd_request.submit_request ('SQLGL',
                                  'GLPPOSS',
                                  'TEST',
                                  NULL,
                                  FALSE,
                                  TO_CHAR (x_sob_id),
                                  TO_CHAR (x_access_set_id),
                                  TO_CHAR (x_coa_id),
                                  TO_CHAR (x_posting_run_id)
                                  --CHR (0)
                                 );

   IF x_conc_id = 0
   THEN
      DBMS_OUTPUT.put_line ('ID: ' || TO_CHAR (x_conc_id));
      fnd_message.retrieve (err_msg);
      DBMS_OUTPUT.put_line (err_msg);
      DBMS_OUTPUT.put_line (fnd_message.get);
      fnd_message.raise_error;
   ELSE
      DBMS_OUTPUT.put_line ('Submitted request_id ' || x_conc_id);
      COMMIT;                                               -- submit the job
   END IF;
END;
When i submitting , it completed with warning.
glpmai() 03-NOV-2012 18:01:50
SHRD0176: GLPPOS started in debug mode... PPOS0003: *** Posting Process Started *** PPOS0004: All phases to posting will be detailed in this log. PPOS0219: glpmai() - Your Posting Run ID is 115641
glucmt() 03-NOV-2012 18:01:50
<< glucmt() 03-NOV-2012 18:01:50
glpini() 03-NOV-2012 18:01:50
SHRD0180: glpini() - Performing action >> check_batches_exist... *PPOS0154: There are no batches to post - posting completed* << glpini() 03-NOV-2012 18:01:50
glucmt() 03-NOV-2012 18:01:50
<< glucmt() 03-NOV-2012 18:01:50 PPOS0037: **** POSTING IS NOW COMPLETE *** << glpmai() 03-NOV-2012 18:01:50
But, in front end i have record to post. How to solve this. Please let me anything i missed in code.

Thanks in advance
Kavi
  • 1. Re: Journal Posting
    597001 Journeyer
    Currently Being Moderated
    --CHR (0)
    Can you uncomment this and run?
    TO_CHAR (x_sob_id),
    Pass ledger id instead. (They are invariably same, but better to pass ledger id)

    If this doesn't help try
    fnd_request.submit_request(
              'SQLGL', 'GLPPOS', 'Test Journal Posting', NULL, FALSE,
                To_Char(l_ledger_id),
                To_Char(l_chart_of_accounts_id),
                To_Char(l_posting_run_id),
                chr(0))
    Cheers,
    ND
    Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered.
  • 2. Re: Journal Posting
    user533671 Newbie
    Currently Being Moderated
    Thanks for Reply.

    But , it is not working. Please. let me know, Any other way.

    thanks
    Kavi
  • 3. Re: Journal Posting
    AlexAnd Guru
    Currently Being Moderated
    >
    'GLPPOSS'
    >
    by user533671

    >
    'GLPPOS'
    >
    by user593998      

    it's different programs

    you can see http://rdbms-erp.blogspot.ru/2010/09/session-for-oracle-fusion-development.html

    but for me for r12
    GLPPOSS have only one parameters Ledger ID with default profile value GL_SET_OF_BKS_ID
    also for GLPPOS only one parameter

    can you check parameters for 'GLPPOSS' for your system
  • 4. Re: Journal Posting
    user533671 Newbie
    Currently Being Moderated
    Hi,

    Both program having only one parameter called 'Ledger id'. But when i'm passing ledger id only it is not taking.

    Thanks
    Kavi

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points