Journal Posting
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:50SHRD0176: 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:50SHRD0180: 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:50But, in front end i have record to post. How to solve this. Please let me anything i missed in code.
Thanks in advance
Kavi
--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.
Similar Messages
-
Journal post request failed with an ERROR, and refers to see LOG file
Which displays following LANGUAGE, that is not understandable by me please tell me how to resolve the issue
General Ledger: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
GLPPOS module: Posting
Current system time is 23-APR-2013 16:26:08
glpmai() 23-APR-2013 16:26:08SHRD0176: 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 115117
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
glpini() 23-APR-2013 16:26:08SHRD0180: glpini() - Performing action >> check_batches_exist...
SHRD0180: glpini() - Performing action >> get_bal_seg_name...
SHRD0180: glpini() - Performing action >> get_mgmt_seg_name...
SHRD0180: glpini() - Performing action >> get_ic_seg_name...
SHRD0180: glpini() - Performing action >> get_cc_seg_name...
SHRD0180: glpini() - Performing action >> get_ss_seg_name...
SHRD0180: glpini() - Performing action >> get_flex_delimiter...
SHRD0180: glpini() - Performing action >> get_flex_segments...
SHRD0180: glpini() - Performing action >> initialize_fafailbat_list...
SHRD0180: glpini() - Performing action >> get_adb_ledger_info...
SHRD0180: glpini() - Performing action >> get_posting_date...
SHRD0180: glpini() - Performing action >> update_batch_status...
SHRD0181: glpini() - num_of_batches_in_posting_req = 1
SHRD0181: glpini() - num_of_headers_updated = 2
glpuch() 23-APR-2013 16:26:08SHRD0180: glpuch() - Performing action >> update_cons_history(G/D/F)...
<< glpuch() 23-APR-2013 16:26:08
glpueh() 23-APR-2013 16:26:08SHRD0180: glpueh() - Performing action >> update_elim_history(G/D/F)...
<< glpueh() 23-APR-2013 16:26:08
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
SHRD0180: glpini() - Performing action >> check_alc_ledgers_exist...
SHRD0180: glpini() - Performing action >> check_sl_ledgers_exist...
SHRD0180: glpini() - Performing action >> is_mrc_acct_type_specific_conv_on...
SHRD0180: glpini() - Performing action >> check_budget_jes_exist...
SHRD0180: glpini() - Performing action >> check_mixed_stat_jes_exist...
SHRD0180: glpini() - Performing action >> check_adj_periods_exist...
SHRD0180: glpini() - Performing action >> check_efb_upgrade_run...
SHRD0181: glpini() - control->access_set_id = 1262
SHRD0181: glpini() - control->coa_id = 53604
SHRD0181: glpini() - control->prun_id = 115117
SHRD0181: glpini() - control->dmode = TRUE
SHRD0181: glpini() - control->num_batches = 1
SHRD0181: glpini() - control->period_set_name = ZNR Accounting
SHRD0181: glpini() - control->period_type = 64
SHRD0181: glpini() - control->industry = C
SHRD0181: glpini() - control->bal_seg_name = SEGMENT1
SHRD0181: glpini() - control->bal_seg_num = 0
SHRD0181: glpini() - control->mgt_seg_name = SEGMENT2
SHRD0181: glpini() - control->mgt_seg_num = 1
SHRD0181: glpini() - control->ic_seg_name = SEGMENT4
SHRD0181: glpini() - control->ic_seg_num = 3
SHRD0181: glpini() - control->cc_seg_name = SEGMENT2
SHRD0181: glpini() - control->cc_seg_num = 1
SHRD0181: glpini() - control->ss_seg_name = SEGMENT2
SHRD0181: glpini() - control->ss_seg_num = 1
SHRD0181: glpini() - control->num_segs = 4
SHRD0181: glpini() - control->batches_exist = TRUE
SHRD0181: glpini() - control->budget_jes_exist = FALSE
SHRD0181: glpini() - control->mixed_stat_jes_exist = FALSE
SHRD0181: glpini() - control->adj_periods_exist = FALSE
SHRD0181: glpini() - control->acct_cat_bal = FALSE
SHRD0181: glpini() - control->alc_ledgers_exist = FALSE
SHRD0181: glpini() - control->sl_ledgers_exist = FALSE
SHRD0181: glpini() - control->max_days_roll_fwd = 32
SHRD0181: glpini() - control->acct_type_conv = FALSE
SHRD0181: glpini() - hist_rate_col =
SHRD0181: glpini() - hist_amt_col =
SHRD0181: glpini() - bs_conversion_type =
SHRD0181: glpini() - is_conversion_type =
SHRD0181: glpini() - preferred_led_id = 1
SHRD0181: glpini() - control->cons_ledgers_exist(excluding_alcs) = FALSE
SHRD0181: glpini() - control->cons_jes_exist(excluding_alcs) = FALSE
SHRD0181: glpini() - control->ab_ledgers_exist(excluding_alcs) = FALSE
SHRD0181: glpini() - control->posting_date = 2013/04/23 16:26:08
SHRD0181: glpini() - control->user_name = OPERATIONS
SHRD0181: glpini() - control->user_id = 1318
SHRD0181: glpini() - control->login_id = 5731484
SHRD0181: glpini() - control->request_id = 6048255
SHRD0181: glpini() - control->program_id = 101
SHRD0181: glpini() - control->efb_upgrade_flag = TRUE
<< glpini() 23-APR-2013 16:26:08
glppva() 23-APR-2013 16:26:08SHRD0180: glppva() - Performing action >> Check for untaxed journals...
SHRD0180: glppva() - Performing action >> Check for unapproved batches...
<< glppva() 23-APR-2013 16:26:08
glpfcr() 23-APR-2013 16:26:08SHRD0180: glpfcr() - Performing action >> get_sid_and_serial#...
SHRD0180: glpfcr() - Performing action >> get_ussgl_profile_option...
SHRD0180: glpfcr() - Performing action >> chk_batch_with_multiple_ledgers...
SHRD0180: glpfcr() - Performing action >> chk_no_funds_required_for_batch...
SHRD0180: glpfcr() - Performing action >> define_batches_cursor...
SHRD0180: glpfcr() - Performing action >> build_ins_bc_packets_stmt...
SHRD0181: glpfcr() - sqlstmtbuf =
INSERT INTO GL_BC_PACKETS(
packet_id,
ledger_id,
je_source_name,
je_category_name,
code_combination_id,
actual_flag,
period_name,
period_year,
period_num,
quarter_num,
currency_code,
status_code,
last_update_date,
last_updated_by,
entered_dr,
entered_cr,
accounted_dr,
accounted_cr,
je_batch_id,
je_header_id,
je_line_num,
budget_version_id,
encumbrance_type_id,
ussgl_transaction_code,
session_id,
serial_id,
application_id)
SELECT
:packet_id,
JEH.ledger_id,
JEH.je_source,
JEH.je_category,
JEL.code_combination_id,
JEB.actual_flag,
JEB.default_period_name,
PS.period_year,
PS.period_num,
PS.quarter_num,
JEH.currency_code,
'P',
sysdate,
:user_id,
nvl(JEL.entered_dr, 0),
nvl(JEL.entered_cr, 0),
nvl(JEL.accounted_dr, 0),
nvl(JEL.accounted_cr, 0),
:je_batch_id,
JEH.je_header_id,
JEL.je_line_num,
JEH.budget_version_id,
JEH.encumbrance_type_id,
JEL.ussgl_transaction_code,
:session_id,
:serial_num,
:appl_id
FROM GL_JE_BATCHES JEB,
GL_JE_HEADERS JEH,
GL_JE_LINES JEL,
GL_PERIOD_STATUSES PS
WHERE JEB.je_batch_id = :je_batch_id
AND JEH.je_batch_id = JEB.je_batch_id
AND JEL.je_header_id = JEH.je_header_id
AND PS.application_id = :appl_id
AND PS.ledger_id = JEH.ledger_id
AND PS.period_name = JEB.default_period_name
SHRD0181: glpfcr() - sqlstmtbuf(len) =
1404
SHRD0180: glpfcr() - Performing action >> process_fc_batches...
<< glpfcr() 23-APR-2013 16:26:08
glpsec() 23-APR-2013 16:26:08SHRD0180: glpsec() - Performing action >> chk_access_set_security...
SHRD0181: glpsec() - sqlstmtbuf =
UPDATE GL_JE_BATCHES JEB
SET JEB.status = 'a'
WHERE JEB.status = 'I'
AND JEB.chart_of_accounts_id = :coa_id
AND JEB.posting_run_id = :prun_id
AND EXISTS (SELECT 'unwriteable journal' FROM gl_je_headers jeh WHERE jeh.je_batch_id = JEB.je_batch_id AND NOT EXISTS (SELECT 'unwriteable journal' FROM gl_access_set_ledgers acc WHERE acc.access_set_id = 1262 AND acc.ledger_id = jeh.ledger_id AND acc.access_privilege_code IN ('B', 'F') ))
SHRD0181: glpsec() - sqlstmtbuf(len) =
454
SHRD0118: Updated 0 record(s) in table: GL_JE_BATCHES
SHRD0180: glpsec() - Performing action >> chk_ledgerBSV_valid...
SHRD0118: Updated 0 record(s) in table: GL_JE_BATCHES
SHRD0180: glpsec() - Performing action >> chk_ledgerMSV_valid...
SHRD0118: Updated 0 record(s) in table: GL_JE_BATCHES
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
<< glpsec() 23-APR-2013 16:26:08
glphok() 23-APR-2013 16:26:08<< glphok() 23-APR-2013 16:26:08
glpsqi() 23-APR-2013 16:26:08SHRD0181: glpsqi() - num_ledgers_locked = 1
<< glpsqi() 23-APR-2013 16:26:08
glpcjl() 23-APR-2013 16:26:08SHRD0180: glpcjl() - Performing action >> build_CJL1_cursor...
SHRD0181: glpcjl() - cjl1_stmt =
SELECT JEH.ledger_id,
JEH.je_header_id,
JEH.je_batch_id,
max(JEH.period_name),
max(JEH.currency_code),
max(JEH.name),
max(JEB.name),
to_char(max(JEH.default_effective_date),'YYYY/MM/DD'),
decode(sign(nvl(sum(JEL.accounted_dr),0)
- nvl(sum(JEL.accounted_cr),0)),
1,
0,
(nvl(sum(JEL.accounted_cr),0)
- nvl(sum(JEL.accounted_dr),0))),
decode(sign(nvl(sum(JEL.accounted_dr),0)
- nvl(sum(JEL.accounted_cr),0)),
1,
(nvl(sum(JEL.accounted_dr),0)
- nvl(sum(JEL.accounted_cr),0)),
0),
max(CC.SEGMENT1),
max(LED.track_rounding_imbalance_flag),
max(nvl(LED.rounding_code_combination_id, 0))
FROM GL_JE_BATCHES JEB,
GL_JE_HEADERS JEH,
GL_LEDGERS LED,
GL_JE_LINES JEL,
GL_CODE_COMBINATIONS CC
WHERE JEB.status = 'I'
AND JEB.chart_of_accounts_id = :coa_id
AND JEB.posting_run_id = :prun_id
AND JEH.je_batch_id = JEB.je_batch_id
AND JEH.currency_code != 'STAT'
AND JEH.status != 'b'
AND JEH.actual_flag != 'B'
AND nvl(JEH.conversion_flag,'x') != 'N'
AND LED.ledger_id = JEH.ledger_id
AND JEH.currency_code != LED.currency_code
AND JEL.code_combination_id = CC.code_combination_id
AND JEL.je_header_id = JEH.je_header_id
GROUP BY JEH.je_batch_id, JEH.je_header_id, CC.SEGMENT1, JEH.ledger_id
HAVING nvl(sum(JEL.entered_dr),0) = nvl(sum(JEL.entered_cr),0)
AND nvl(sum(JEL.accounted_dr),0) != nvl(sum(JEL.accounted_cr),0)
ORDER BY JEH.je_batch_id, JEH.ledger_id, JEH.je_header_id, CC.SEGMENT1
SHRD0181: glpcjl() - cjl1_stmt(len) = 1835
SHRD0180: glpcjl() - Performing action >> build_CJL2_cursor...
SHRD0181: glpcjl() - cjl2_stmt =
SELECT JEH.ledger_id,
JEH.je_header_id,
JEH.je_batch_id,
max(JEH.period_name),
max(JEH.currency_code),
max(JEH.name),
max(JEB.name),
to_char(max(JEH.default_effective_date),'YYYY/MM/DD'),
decode(sign(nvl(sum(JEL.accounted_dr),0)
- nvl(sum(JEL.accounted_cr),0)),
1,
0,
(nvl(sum(JEL.accounted_cr),0)
- nvl(sum(JEL.accounted_dr),0))),
decode(sign(nvl(sum(JEL.accounted_dr),0)
- nvl(sum(JEL.accounted_cr),0)),
1,
(nvl(sum(JEL.accounted_dr),0)
- nvl(sum(JEL.accounted_cr),0)),
0),
max(CC.SEGMENT1),
max(LED.track_rounding_imbalance_flag),
max(nvl(LED.rounding_code_combination_id, 0))
FROM GL_JE_BATCHES JEB,
GL_JE_HEADERS JEH,
GL_LEDGERS LED,
GL_JE_LINES JEL,
GL_CODE_COMBINATIONS CC
WHERE JEB.status = 'I'
AND JEB.chart_of_accounts_id = :coa_id
AND JEB.posting_run_id = :prun_id
AND JEH.je_batch_id = JEB.je_batch_id
AND JEH.currency_code != 'STAT'
AND JEH.status != 'b'
AND JEH.actual_flag != 'B'
AND nvl(JEH.conversion_flag,'x') != 'N'
AND LED.ledger_id = JEH.ledger_id
AND JEH.currency_code != LED.currency_code
AND JEL.code_combination_id = CC.code_combination_id
AND JEL.je_header_id = JEH.je_header_id
GROUP BY JEH.je_batch_id, JEH.je_header_id, JEH.ledger_id
HAVING nvl(sum(JEL.entered_dr),0) = nvl(sum(JEL.entered_cr),0)
AND nvl(sum(JEL.accounted_dr),0) != nvl(sum(JEL.accounted_cr),0)
ORDER BY JEH.je_batch_id, JEH.ledger_id, JEH.je_header_id
SHRD0181: glpcjl() - cjl2_stmt(len) = 1807
SHRD0180: glpcjl() - Performing action >> build_CJL3_cursor...
SHRD0181: glpcjl() - cjl3_stmt =
SELECT CC.SEGMENT1
FROM GL_JE_LINES JEL,
GL_CODE_COMBINATIONS CC
WHERE JEL.je_header_id = :jeh_id
AND CC.code_combination_id = JEL.code_combination_id + 0
AND (JEL.accounted_cr + (JEL.je_line_num/1000000)) =
(SELECT max(JEL1.accounted_cr + (JEL1.je_line_num/1000000))
FROM GL_JE_LINES JEL1
WHERE JEL1.je_header_id = :jeh_id)
SHRD0181: glpcjl() - cjl3_stmt(len) = 401
SHRD0180: glpcjl() - Performing action >> build_CJL4_cursor...
SHRD0181: glpcjl() - cjl4_stmt =
SELECT CC.SEGMENT1
FROM GL_JE_LINES JEL,
GL_CODE_COMBINATIONS CC
WHERE JEL.je_header_id = :jeh_id
AND CC.code_combination_id = JEL.code_combination_id + 0
AND (JEL.accounted_dr + (JEL.je_line_num/1000000)) =
(SELECT max(JEL1.accounted_dr + (JEL1.je_line_num/1000000))
FROM GL_JE_LINES JEL1
WHERE JEL1.je_header_id = :jeh_id)
SHRD0181: glpcjl() - cjl4_stmt(len) = 401
SHRD0180: glpcjl() - Performing action >> build_CJL5_stmt...
SHRD0181: glpcjl() - cjl5_stmt =
UPDATE GL_JE_LINES jel1
SET jel1.accounted_cr = jel1.accounted_cr + (:mtl * :acr)
WHERE jel1.je_header_id = :jeh_id
AND jel1.accounted_cr + (jel1.je_line_num/1000000) =
(SELECT max(jel2.accounted_cr +
(jel2.je_line_num/1000000))
FROM GL_JE_LINES jel2
WHERE jel2.je_header_id = :jeh_id)
SHRD0181: glpcjl() - cjl5_stmt(len) = 364
SHRD0180: glpcjl() - Performing action >> build_CJL6_stmt...
SHRD0181: glpcjl() - cjl6_stmt =
UPDATE GL_JE_LINES jel1
SET jel1.accounted_cr = jel1.accounted_cr + (:mtl * :acr)
WHERE jel1.je_header_id = :jeh_id
AND jel1.accounted_cr + (jel1.je_line_num/1000000) =
(SELECT max(jel2.accounted_cr +
(jel2.je_line_num/1000000))
FROM GL_CODE_COMBINATIONS cc, GL_JE_LINES jel2
WHERE jel2.je_header_id = :jeh_id
AND cc.code_combination_id =
jel2.code_combination_id + 0
AND cc.SEGMENT1 || '' = :plug_balseg)
SHRD0181: glpcjl() - cjl6_stmt(len) = 535
SHRD0180: glpcjl() - Performing action >> build_CJL7_stmt...
SHRD0181: glpcjl() - cjl7_stmt =
UPDATE GL_JE_LINES jel1
SET jel1.accounted_dr = jel1.accounted_dr + (:mtl * :adr)
WHERE jel1.je_header_id = :jeh_id
AND jel1.accounted_dr + (jel1.je_line_num/1000000) =
(SELECT max(jel2.accounted_dr +
(jel2.je_line_num/1000000))
FROM GL_JE_LINES jel2
WHERE jel2.je_header_id = :jeh_id)
SHRD0181: glpcjl() - cjl7_stmt(len) = 364
SHRD0180: glpcjl() - Performing action >> build_CJL8_stmt...
SHRD0181: glpcjl() - cjl8_stmt =
UPDATE GL_JE_LINES jel1
SET jel1.accounted_dr = jel1.accounted_dr + (:mtl * :adr)
WHERE jel1.je_header_id = :jeh_id
AND jel1.accounted_dr + (jel1.je_line_num/1000000) =
(SELECT max(jel2.accounted_dr +
(jel2.je_line_num/1000000))
FROM GL_CODE_COMBINATIONS cc, GL_JE_LINES jel2
WHERE jel2.je_header_id = :jeh_id
AND cc.code_combination_id =
jel2.code_combination_id + 0
AND cc.SEGMENT1 || '' = :plug_balseg)
SHRD0181: glpcjl() - cjl8_stmt(len) = 535
SHRD0180: glpcjl() - Performing action >> build_ins_je_segvals...
SHRD0180: glpcjl() - Performing action >> build_ins_recon_lines...
SHRD0180: glpcjl() - Performing action >> loop_through_CJL1_cursor...
SHRD0026: Current system time is: 23-APR-2013 16:26:08
SHRD0180: glpcjl() - Performing action >> loop_through_CJL2_cursor...
SHRD0026: Current system time is: 23-APR-2013 16:26:08
<< glpcjl() 23-APR-2013 16:26:08
glpcbs() 23-APR-2013 16:26:08SHRD0180: glpcbs() - Performing action >> validate_header_attributes...
SHRD0118: Updated 2 record(s) in table: GL_JE_HEADERS
SHRD0180: glpcbs() - Performing action >> check_period_status_for_batches...
SHRD0118: Updated 0 record(s) in table: GL_JE_BATCHES
SHRD0180: glpcbs() - Performing action >> validate_period_name_for_batches...
SHRD0118: Updated 0 record(s) in table: GL_JE_BATCHES
SHRD0180: glpcbs() - Performing action >> validate_frozen_budget_and_org_for_headers...
SHRD0118: Updated 0 record(s) in table: GL_JE_HEADERS
SHRD0180: glpcbs() - Performing action >> validate_frozen_budget_accounts_for_headers...
SHRD0181: glpcbs() - sqlstmtbuf =
UPDATE GL_JE_HEADERS JEH
SET STATUS = 'Y'
WHERE JEH.je_batch_id in
(SELECT JEB1.je_batch_id
FROM GL_JE_BATCHES JEB1
WHERE JEB1.actual_flag = 'B'
AND JEB1.status = 'I'
AND JEB1.chart_of_accounts_id = :vcoa_id
AND JEB1.posting_run_id = :vprun_id)
AND JEH.status = 'U'
AND EXISTS
(SELECT 1
FROM GL_JE_LINES JEL,
GL_BUDGET_FROZEN_RANGES FRZ,
GL_CODE_COMBINATIONS CC,
GL_BUDGET_ASSIGNMENTS ASG
WHERE JEL.je_header_id = JEH.je_header_id
AND FRZ.budget_version_id = JEH.budget_version_id
AND ASG.budget_entity_id = FRZ.budget_entity_id
AND CC.code_combination_id =
JEL.code_combination_id
AND CC.chart_of_accounts_id = :vcoa_id
AND ASG.code_combination_id =
JEL.code_combination_id
AND CC.SEGMENT1 BETWEEN FRZ.SEGMENT1_low and FRZ.SEGMENT1_high
AND CC.SEGMENT2 BETWEEN FRZ.SEGMENT2_low and FRZ.SEGMENT2_high
AND CC.SEGMENT3 BETWEEN FRZ.SEGMENT3_low and FRZ.SEGMENT3_high
AND CC.SEGMENT4 BETWEEN FRZ.SEGMENT4_low and FRZ.SEGMENT4_high
SHRD0181: glpcbs() - sqlstmtbuf(len) =
1198
SHRD0118: Updated 0 record(s) in table: GL_JE_HEADERS
SHRD0180: glpcbs() - Performing action >> update_batch_status_for_error_budget_jrnls...
SHRD0118: Updated 0 record(s) in table: GL_JE_BATCHES
SHRD0180: glpcbs() - Performing action >> validate_ccids_and_others_for_headers...
SHRD0181: glpcbs() - sqlstmtbuf =
UPDATE GL_JE_HEADERS JEH
SET (running_total_dr,
running_total_cr,
running_total_accounted_dr,
running_total_accounted_cr,
multi_bal_seg_flag,
balanced_je_flag,
balancing_segment_value,
status) =
(SELECT sum(nvl(JEL.entered_dr,0)),
sum(nvl(JEL.entered_cr,0)),
sum(nvl(JEL.accounted_dr,0)),
sum(nvl(JEL.accounted_cr,0)),
decode(count(distinct CC.SEGMENT1), 1, 'N',
'Y'),
decode(sign(sum(nvl(JEL.accounted_cr,0)) -
sum(nvl(JEL.accounted_dr,0))),
0, 'Y', 'N'),
decode(sign(sum(nvl(JEL.accounted_cr,0)) -
sum(nvl(JEL.accounted_dr,0))),
0, decode(sign(sum(nvl(JEL.entered_cr,0))
- sum(nvl(JEL.entered_dr,0))),
0, '',
max(CC.SEGMENT1)),
max(CC.SEGMENT1)),
decode(sum (distinct
decode(CC.code_combination_id, null, 1,
decode(CC.enabled_flag, 'N', 100,
decode(sign(CC.start_date_active -
JEL.effective_date),
1, 1000,
decode(sign(CC.end_date_active -
JEL.effective_date),
-1, 10000,
decode(CC.template_id, null,
decode(JEH.actual_flag,
'B', 0,
'E', 0,
decode(CC.detail_posting_allowed_flag,
'N', 10, 0)), 100000)))))),
0, 'U',
1, 'A',
10, 'C',
100, 'F',
1000, 'J',
10000, 'M',
100000, 'V',
'Z')
FROM GL_JE_LINES JEL,
GL_CODE_COMBINATIONS CC
WHERE JEL.je_header_id = JEH.je_header_id
AND JEL.code_combination_id =
CC.code_combination_id(+)
AND CC.chart_of_accounts_id(+) = :vcoa_id)
WHERE JEH.status = 'U'
AND JEH.je_batch_id IN
(SELECT JEB1.je_batch_id
FROM GL_JE_BATCHES JEB1
WHERE JEB1.status = 'I'
AND JEB1.chart_of_accounts_id = :vcoa_id
AND JEB1.posting_run_id = :vprun_id)
SHRD0181: glpcbs() - sqlstmtbuf(len) =
2195
SHRD0118: Updated 2 record(s) in table: GL_JE_HEADERS
SHRD0180: glpcbs() - Performing action >> update_batch_running_totals...
SHRD0118: Updated 1 record(s) in table: GL_JE_BATCHES
SHRD0180: glpcbs() - Performing action >> validate_batch_control_totals_and_suspense...
SHRD0118: Updated 1 record(s) in table: GL_JE_BATCHES
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
<< glpcbs() 23-APR-2013 16:26:08
glpisl() 23-APR-2013 16:26:08SHRD0180: glpisl() - Performing action >> build_ISL1_cursor...
SHRD0180: glpisl() - Performing action >> build_ISL2_cursor...
SHRD0181: glpisl() - isl2_stmt =
SELECT
CC.SEGMENT1,
decode(sign(sum(nvl(JEL.accounted_cr,0))
- sum(nvl(JEL.accounted_dr,0))),
1, (sum(nvl(JEL.accounted_cr,0)) - sum(nvl(JEL.accounted_dr,0))),
0),
decode(sign(sum(nvl(JEL.accounted_cr,0))
- sum(nvl(JEL.accounted_dr,0))),
1, 0,
(sum(nvl(JEL.accounted_dr,0)) - sum(nvl(JEL.accounted_cr,0)))),
decode(sign(sum(nvl(JEL.entered_cr,0))
- sum(nvl(JEL.entered_dr,0))),
1, (sum(nvl(JEL.entered_cr,0)) - sum(nvl(JEL.entered_dr,0))),
0),
decode(sign(sum(nvl(JEL.entered_cr,0))
- sum(nvl(JEL.entered_dr,0))),
1, 0,
(sum(nvl(JEL.entered_dr,0)) - sum(nvl(JEL.entered_cr,0))))
FROM GL_JE_LINES JEL,
GL_CODE_COMBINATIONS CC
WHERE JEL.je_header_id = :jeh_id
AND CC.code_combination_id = JEL.code_combination_id
GROUP BY SEGMENT1
SHRD0181: glpisl() - isl2_stmt(len) = 969
SHRD0180: glpisl() - Performing action >> build_ISL3_cursor...
SHRD0180: glpisl() - Performing action >> build_ISL4_cursor...
SHRD0180: glpisl() - Performing action >> build_ins_je_segvals...
SHRD0180: glpisl() - Performing action >> build_ins_recon_lines...
SHRD0180: glpisl() - Performing action >> loop_through_ISL1_cursor...
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
<< glpisl() 23-APR-2013 16:26:08
glpiil() 23-APR-2013 16:26:08
glpince() 23-APR-2013 16:26:08SHRD0180: glpince() - Performing action >> find_ic_journals...
SHRD0181: glpince() - sqlstmtbuf =
UPDATE gl_je_headers jh
SET jh.multi_bal_seg_flag = 'I'
WHERE jh.je_batch_id IN
(SELECT jb.je_batch_id
FROM gl_je_batches jb
WHERE jb.chart_of_accounts_id = :coa_id
AND jb.posting_run_id = :prun_id
AND jb.actual_flag != 'B'
AND jb.status = 'I'
AND jh.currency_code != 'STAT'
AND jh.status != 'P'
AND jh.multi_bal_seg_flag = 'Y'
AND EXISTS
(SELECT 'unbalanced intercompany journals'
FROM gl_ledgers led,
gl_je_lines jl,
gl_code_combinations cc
WHERE led.ledger_id = jh.ledger_id
AND led.allow_intercompany_post_flag = 'Y'
AND jl.je_header_id = jh.je_header_id
AND cc.code_combination_id = jl.code_combination_id
GROUP BY cc.SEGMENT1
HAVING SUM(NVL(jl.accounted_dr,0)) !=
SUM(NVL(jl.accounted_cr,0))
SHRD0181: glpince() - sqlstmtbuf(len) =
946
SHRD0180: glpince() - Performing action >> Check for ic journals with actual balances...
SHRD0118: Updated 0 record(s) in table: GL_JE_HEADERS
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
<< glpince() 23-APR-2013 16:26:08
PPOS0247: There are no intercompany or intracompany journals that require balancing.
<< glpiil() 23-APR-2013 16:26:08
glpcib() 23-APR-2013 16:26:08<< glpcib() 23-APR-2013 16:26:08
glpmni() 23-APR-2013 16:26:08SHRD0180: glpmni() - Performing action >> get_net_income_cc...
SHRD0181: glpmni() - sqlstmtbuf =
SELECT distinct JEH.je_header_id,
to_char(JEH.default_effective_date, 'YYYY/MM/DD'),
LED.ledger_id,
LED.net_income_code_combination_id,
CC.SEGMENT1
FROM GL_JE_BATCHES JEB,
GL_JE_HEADERS JEH,
GL_LEDGERS LED,
GL_JE_LINES JEL,
GL_CODE_COMBINATIONS CC
WHERE JEB.status = 'I'
AND JEB.posting_run_id = :vprun_id
AND JEB.actual_flag = 'A'
AND JEB.je_batch_id = JEH.je_batch_id
AND LED.ledger_id = JEH.ledger_id
AND LED.enable_average_balances_flag = 'Y'
AND JEB.average_journal_flag =
decode(LED.consolidation_ledger_flag, 'Y', 'Y', 'N')
AND JEL.je_header_id = JEH.je_header_id
AND JEL.status = 'U'
AND CC.code_combination_id = JEL.code_combination_id
AND NOT EXISTS
( SELECT 'Net income account exists for this bsv'
FROM GL_NET_INCOME_ACCOUNTS NIA
WHERE NIA.ledger_id = JEH.ledger_id
AND NIA.bal_seg_value = CC.SEGMENT1)
ORDER BY LED.ledger_id,
CC.SEGMENT1
SHRD0181: glpmni() - sqlstmtbuf(len) = 1019
SHRD0180: glpmni() - Performing action >> prepare_ni_templates_cursor...
SHRD0180: glpmni() - Performing action >> begin_processing_cursor...
SHRD0147: Finished processing rows
SHRD0180: glpmni() - Performing action >> reinitialize_adb_variables...
SHRD0026: Current system time is: 23-APR-2013 16:26:08
SHRD0181: glpmni() - control->ab_ledgers_exist(including_alcs) = FALSE
<< glpmni() 23-APR-2013 16:26:08
glperp() 23-APR-2013 16:26:08
glperp() 23-APR-2013 16:26:08SHRD0181: glperp() - batch_name = Reverses "Zn Computer Sales"17-APR-13 15:57:42 - 6045453
SHRD0181: glperp() - batch_per = JUL-13
SHRD0181: glperp() - num_of_batches_in_error = 0
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
<< glperp() 23-APR-2013 16:26:08
glpsqp() 23-APR-2013 16:26:08<< glpsqp() 23-APR-2013 16:26:08
glpsqs() 23-APR-2013 16:26:08PERF0005: Oracle error detected in glpsqs() - ORA-20001: An active sequence assignment is required.
ORA-06512: at "A
<x glpsqs() 23-APR-2013 16:26:08
glpuch() 23-APR-2013 16:26:08SHRD0180: glpuch() - Performing action >> update_cons_history(G/D/F)...
<< glpuch() 23-APR-2013 16:26:08
glpueh() 23-APR-2013 16:26:08SHRD0180: glpueh() - Performing action >> update_elim_history(G/D/F)...
<< glpueh() 23-APR-2013 16:26:08
glpsqx() 23-APR-2013 16:26:08<< glpsqx() 23-APR-2013 16:26:08
glucmt() 23-APR-2013 16:26:08<< glucmt() 23-APR-2013 16:26:08
PPOS0002: Posting terminated with fatal errors
<x glpmai() 23-APR-2013 16:26:08
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
Executing request completion options...
Finished executing request completion options.
Concurrent program returned no reason for failure.
+---------------------------------------------------------------------------+
Concurrent request completed
Current system time is 23-APR-2013 16:26:08
+---------------------------------------------------------------------------+Please see if the following docs help.
R12: Posting Throws ORA-06512: at "APPS.GL_GLPPOS_ACCTSEQ_PKG" [ID 1058014.1]
Posting a Journal Fails in GLPHOK due to ORA-20001 error [ID 242002.1]
GL Posting Program Terminated With Errors in GLPUBR [ID 292683.1]
Thanks,
Hussein -
Automating Cash Journal Posting using inbound proxy interface and upload program
Hi Experts,
I have a requirement where in cash journal posting needs to be carried out automatically by an inbound interface on a periodic basis and at the start during cut over an upload program needs to be used to upload beg balance data . For this purpose I have used BAPI_CASHJOURNALDOC_CREATE to save cash journal entries along with BAPI TRANSACTION COMMIT.
Once the Data is successfully saved I am using FM FCJ_GET_DATA_FOR_SCREEN to get prerequisite data for the FM FCJ_POST_ALL which is used by the Standard cash journal program internally to post the saved data. ( I got this by debugging the standard transaction and both FMs are not yet released )
The issues I am facing is that the the FM FCJ_POST_ALL does not always post the data it behaves in random fashion i.e some times it posts the entries where as sometimes it does not post the entries.
I have tried using commit work after the FM but that also does not result in consistent behavior of the program. One more issue is the i am not allowed to use commit work in a an inbound proxy so how do i proceed ?
I am attaching the code for further analysis:
DATA: LIT_TCJ_TRANS_NAMES TYPE TABLE OF TCJ_TRANS_NAMES,
LWA_TCJ_TRANS_NAMES TYPE TCJ_TRANS_NAMES,
LV_WAIT TYPE BAPITA-WAIT VALUE '1',
LV_RECORD_NO TYPE SY-TABIX.
DATA : LIT_POSTING TYPE STANDARD TABLE OF ISCJ_POSTINGS,
LIT_WTAX_ITEMS TYPE STANDARD TABLE OF TCJ_WTAX_ITEMS,
LIT_SPLIT_POSTINGS TYPE STANDARD TABLE OF ISCJ_POSTINGS,
LIT_CPD TYPE STANDARD TABLE OF TCJ_CPD.
DATA: LV_BEG_BALANCE TYPE CJAMOUNT,
LV_TOTAL_RECEIPTS TYPE CJAMOUNT,
LV_TOTAL_PAYMENTS TYPE CJAMOUNT,
LV_TOTAL_CHECKS TYPE CJAMOUNT,
LV_RUN_BALANCE TYPE CJAMOUNT,
LV_RUN_CASH_BALANCE TYPE CJAMOUNT,
LV_NUMB_OF_REC TYPE I,
LV_NUMB_OF_PAYM TYPE I,
LV_NUMB_OF_CHECKS TYPE I.
DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
SELECT MANDT COMP_CODE TRANSACT_NUMBER LANGU TRANSACT_NAME LONG_TEXT
FROM TCJ_TRANS_NAMES
INTO TABLE LIT_TCJ_TRANS_NAMES
WHERE LANGU = GC_EN.
IF SY-SUBRC <> 0.
MESSAGE 'No Business Transaction maintained for Company Code in this client'(016) TYPE GC_I.
LEAVE LIST-PROCESSING.
ENDIF.
DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
LOOP AT GIT_CJ INTO GWA_CJ.
LV_RECORD_NO = SY-TABIX.
CLEAR: GS_HEADER_BAPI,
GS_CJ_KEY,
GWA_ITEMS.
REFRESH: GIT_ITEMS,
GIT_RETURN.
GS_HEADER_BAPI-COMP_CODE = GWA_CJ-BUKRS.
GS_HEADER_BAPI-CAJO_NUMBER = GWA_CJ-CJNR.
GS_HEADER_BAPI-CURRENCY = GC_PHP.
CLEAR LWA_TCJ_TRANS_NAMES.
READ TABLE LIT_TCJ_TRANS_NAMES INTO LWA_TCJ_TRANS_NAMES WITH KEY COMP_CODE = GWA_CJ-BUKRS
LANGU = GC_EN
TRANSACT_NAME = GWA_CJ-BTNAM.
IF SY-SUBRC = 0.
GWA_ITEMS-TRANSACT_NUMBER = LWA_TCJ_TRANS_NAMES-TRANSACT_NUMBER.
GWA_ITEMS-P_RECEIPTS = GWA_CJ-CJRAT.
GWA_ITEMS-TAX_CODE = GWA_CJ-TXCOD.
GS_HEADER_BAPI-BP_NAME = GWA_CJ-BPNAM.
GWA_ITEMS-POSITION_TEXT = GWA_CJ-POTXT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-LIFNR
IMPORTING
OUTPUT = GWA_ITEMS-VENDOR_NO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-KUNNR
IMPORTING
OUTPUT = GWA_ITEMS-CUSTOMER.
PERFORM SUB_DATE_FROMAT_BAPI CHANGING GWA_CJ-BLDAT
GS_HEADER_BAPI-DOC_DATE.
PERFORM SUB_DATE_FROMAT_BAPI CHANGING GWA_CJ-BUDAT
GS_HEADER_BAPI-PSTNG_DATE.
GS_HEADER_BAPI-REF_DOC_NO = GWA_CJ-XBLNR.
GS_HEADER_BAPI-ALLOC_NMBR = GWA_CJ-ALLNO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-KOSTL
IMPORTING
OUTPUT = GWA_ITEMS-COSTCENTER.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-PRCTR
IMPORTING
OUTPUT = GWA_ITEMS-PROFIT_CTR.
APPEND GWA_ITEMS TO GIT_ITEMS.
CALL FUNCTION 'BAPI_CASHJOURNALDOC_CREATE'
EXPORTING
HEADER = GS_HEADER_BAPI
IMPORTING
COMPANY_CODE = GS_CJ_KEY-COMP_CODE
CASH_JOURNAL_NUMBER = GS_CJ_KEY-CAJO_NUMBER
FISCAL_YEAR = GS_CJ_KEY-FISC_YEAR
CASH_JOURNAL_DOC_NO = GS_CJ_KEY-POSTING_NUMBER
TABLES
ITEMS = GIT_ITEMS
RETURN = GIT_RETURN.
IF GIT_RETURN IS NOT INITIAL.
READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_E.
IF SY-SUBRC <> 0.
CLEAR GWA_CJ_S.
MOVE-CORRESPONDING GS_CJ_KEY TO GWA_CJ_S.
CLEAR GWA_RETURN.
READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_S.
IF SY-SUBRC = 0.
MOVE GWA_RETURN-MESSAGE TO GWA_CJ_S-MSG.
CLEAR GWA_RETURN.
READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_I.
IF SY-SUBRC = 0.
CLEAR GWA_CJ_E.
CONCATENATE GWA_RETURN-MESSAGE GWA_CJ_S-MSG INTO GWA_CJ_E-MSG SEPARATED BY GC_PIPE_FORMAT.
MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
APPEND GWA_CJ_E TO GIT_CJ_E.
GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
ELSE.
IF P_TEST NE GC_X.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = LV_WAIT.
REFRESH:LIT_POSTING ,
LIT_WTAX_ITEMS ,
LIT_SPLIT_POSTINGS ,
LIT_CPD .
CLEAR: LV_BEG_BALANCE ,
LV_TOTAL_RECEIPTS ,
LV_TOTAL_PAYMENTS ,
LV_TOTAL_CHECKS ,
LV_RUN_BALANCE ,
LV_RUN_CASH_BALANCE ,
LV_NUMB_OF_REC ,
LV_NUMB_OF_PAYM ,
LV_NUMB_OF_CHECKS .
CALL FUNCTION 'FCJ_GET_DATA_FOR_SCREEN'
EXPORTING
I_COMP_CODE = GS_CJ_KEY-COMP_CODE
I_CAJO_NUMBER = GS_CJ_KEY-CAJO_NUMBER
I_DISPLAY_PERIOD_LO = GS_HEADER_BAPI-PSTNG_DATE
I_DISPLAY_PERIOD_HI = GS_HEADER_BAPI-PSTNG_DATE
IMPORTING
E_BEGINNING_BALANCE = LV_BEG_BALANCE
E_RUNNING_BALANCE = LV_RUN_BALANCE
E_RUNNING_CASH_BALANCE = LV_RUN_CASH_BALANCE
E_TOTAL_RECEIPTS = LV_TOTAL_RECEIPTS
E_TOTAL_REC_NUMBER = LV_NUMB_OF_REC
E_TOTAL_PAYMENTS = LV_TOTAL_PAYMENTS
E_TOTAL_PAYM_NUMBER = LV_NUMB_OF_PAYM
E_TOTAL_CHECKS = LV_TOTAL_CHECKS
E_TOTAL_CHECKS_NUMBER = LV_NUMB_OF_CHECKS
TABLES
E_POSTINGS = LIT_POSTING
E_WTAX_ITEMS = LIT_WTAX_ITEMS
E_SPLIT_POSTINGS = LIT_SPLIT_POSTINGS
E_CPD = LIT_CPD.
CALL FUNCTION 'FCJ_POST_ALL'
EXPORTING
I_COMP_CODE = GS_CJ_KEY-COMP_CODE
I_CAJO_NUMBER = GS_CJ_KEY-CAJO_NUMBER
I_CURRENCY = GS_HEADER_BAPI-CURRENCY
I_TYP = 'R'
I_DISPLAY_PERIOD_LO = GS_HEADER_BAPI-PSTNG_DATE
I_DISPLAY_PERIOD_HI = GS_HEADER_BAPI-PSTNG_DATE
* IMPORTING
* E_ERROR_NUMBER =
TABLES
ITCJ_POSTINGS = LIT_POSTING
ITCJ_WTAX_ITEMS = LIT_WTAX_ITEMS
ITCJ_SPLIT_POSTINGS = LIT_SPLIT_POSTINGS
ITCJ_CPD = LIT_CPD
CHANGING
P_BEG_BALANCE = LV_BEG_BALANCE
P_TOTAL_RECEIPTS = LV_TOTAL_RECEIPTS
P_TOTAL_PAYMENTS = LV_TOTAL_PAYMENTS
P_TOTAL_CHECKS = LV_TOTAL_CHECKS
P_RUN_BALANCE = LV_RUN_BALANCE
P_RUN_CASH_BALANCE = LV_RUN_CASH_BALANCE
P_NUMB_OF_REC = LV_NUMB_OF_REC
P_NUMB_OF_PAYM = LV_NUMB_OF_PAYM
P_NUMB_OF_CHECKS = LV_NUMB_OF_CHECKS.
COMMIT WORK.
ENDIF.
APPEND GWA_CJ_S TO GIT_CJ_S.
GV_SUCCESS_RECORDS = GV_SUCCESS_RECORDS + GC_1.
CLEAR GWA_CJ_S.
ENDIF.
ENDIF.
ELSE.
CLEAR GWA_CJ_E.
MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
APPEND GWA_CJ_E TO GIT_CJ_E.
GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
ENDIF.
ENDIF.
ELSE.
GWA_RETURN-MESSAGE = 'Transaction Name does not correspond to any Transaction Number'(017).
CLEAR GWA_CJ_E.
MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
APPEND GWA_CJ_E TO GIT_CJ_E.
GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
ENDIF.
ENDLOOP.
ENDFORM. " SUB_BAPI_CALLHi Experts,
I have a requirement where in cash journal posting needs to be carried out automatically by an inbound interface on a periodic basis and at the start during cut over an upload program needs to be used to upload beg balance data . For this purpose I have used BAPI_CASHJOURNALDOC_CREATE to save cash journal entries along with BAPI TRANSACTION COMMIT.
Once the Data is successfully saved I am using FM FCJ_GET_DATA_FOR_SCREEN to get prerequisite data for the FM FCJ_POST_ALL which is used by the Standard cash journal program internally to post the saved data. ( I got this by debugging the standard transaction and both FMs are not yet released )
The issues I am facing is that the the FM FCJ_POST_ALL does not always post the data it behaves in random fashion i.e some times it posts the entries where as sometimes it does not post the entries.
I have tried using commit work after the FM but that also does not result in consistent behavior of the program. One more issue is the i am not allowed to use commit work in a an inbound proxy so how do i proceed ?
I am attaching the code for further analysis:
DATA: LIT_TCJ_TRANS_NAMES TYPE TABLE OF TCJ_TRANS_NAMES,
LWA_TCJ_TRANS_NAMES TYPE TCJ_TRANS_NAMES,
LV_WAIT TYPE BAPITA-WAIT VALUE '1',
LV_RECORD_NO TYPE SY-TABIX.
DATA : LIT_POSTING TYPE STANDARD TABLE OF ISCJ_POSTINGS,
LIT_WTAX_ITEMS TYPE STANDARD TABLE OF TCJ_WTAX_ITEMS,
LIT_SPLIT_POSTINGS TYPE STANDARD TABLE OF ISCJ_POSTINGS,
LIT_CPD TYPE STANDARD TABLE OF TCJ_CPD.
DATA: LV_BEG_BALANCE TYPE CJAMOUNT,
LV_TOTAL_RECEIPTS TYPE CJAMOUNT,
LV_TOTAL_PAYMENTS TYPE CJAMOUNT,
LV_TOTAL_CHECKS TYPE CJAMOUNT,
LV_RUN_BALANCE TYPE CJAMOUNT,
LV_RUN_CASH_BALANCE TYPE CJAMOUNT,
LV_NUMB_OF_REC TYPE I,
LV_NUMB_OF_PAYM TYPE I,
LV_NUMB_OF_CHECKS TYPE I.
DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
SELECT MANDT COMP_CODE TRANSACT_NUMBER LANGU TRANSACT_NAME LONG_TEXT
FROM TCJ_TRANS_NAMES
INTO TABLE LIT_TCJ_TRANS_NAMES
WHERE LANGU = GC_EN.
IF SY-SUBRC <> 0.
MESSAGE 'No Business Transaction maintained for Company Code in this client'(016) TYPE GC_I.
LEAVE LIST-PROCESSING.
ENDIF.
DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
LOOP AT GIT_CJ INTO GWA_CJ.
LV_RECORD_NO = SY-TABIX.
CLEAR: GS_HEADER_BAPI,
GS_CJ_KEY,
GWA_ITEMS.
REFRESH: GIT_ITEMS,
GIT_RETURN.
GS_HEADER_BAPI-COMP_CODE = GWA_CJ-BUKRS.
GS_HEADER_BAPI-CAJO_NUMBER = GWA_CJ-CJNR.
GS_HEADER_BAPI-CURRENCY = GC_PHP.
CLEAR LWA_TCJ_TRANS_NAMES.
READ TABLE LIT_TCJ_TRANS_NAMES INTO LWA_TCJ_TRANS_NAMES WITH KEY COMP_CODE = GWA_CJ-BUKRS
LANGU = GC_EN
TRANSACT_NAME = GWA_CJ-BTNAM.
IF SY-SUBRC = 0.
GWA_ITEMS-TRANSACT_NUMBER = LWA_TCJ_TRANS_NAMES-TRANSACT_NUMBER.
GWA_ITEMS-P_RECEIPTS = GWA_CJ-CJRAT.
GWA_ITEMS-TAX_CODE = GWA_CJ-TXCOD.
GS_HEADER_BAPI-BP_NAME = GWA_CJ-BPNAM.
GWA_ITEMS-POSITION_TEXT = GWA_CJ-POTXT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-LIFNR
IMPORTING
OUTPUT = GWA_ITEMS-VENDOR_NO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-KUNNR
IMPORTING
OUTPUT = GWA_ITEMS-CUSTOMER.
PERFORM SUB_DATE_FROMAT_BAPI CHANGING GWA_CJ-BLDAT
GS_HEADER_BAPI-DOC_DATE.
PERFORM SUB_DATE_FROMAT_BAPI CHANGING GWA_CJ-BUDAT
GS_HEADER_BAPI-PSTNG_DATE.
GS_HEADER_BAPI-REF_DOC_NO = GWA_CJ-XBLNR.
GS_HEADER_BAPI-ALLOC_NMBR = GWA_CJ-ALLNO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-KOSTL
IMPORTING
OUTPUT = GWA_ITEMS-COSTCENTER.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GWA_CJ-PRCTR
IMPORTING
OUTPUT = GWA_ITEMS-PROFIT_CTR.
APPEND GWA_ITEMS TO GIT_ITEMS.
CALL FUNCTION 'BAPI_CASHJOURNALDOC_CREATE'
EXPORTING
HEADER = GS_HEADER_BAPI
IMPORTING
COMPANY_CODE = GS_CJ_KEY-COMP_CODE
CASH_JOURNAL_NUMBER = GS_CJ_KEY-CAJO_NUMBER
FISCAL_YEAR = GS_CJ_KEY-FISC_YEAR
CASH_JOURNAL_DOC_NO = GS_CJ_KEY-POSTING_NUMBER
TABLES
ITEMS = GIT_ITEMS
RETURN = GIT_RETURN.
IF GIT_RETURN IS NOT INITIAL.
READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_E.
IF SY-SUBRC <> 0.
CLEAR GWA_CJ_S.
MOVE-CORRESPONDING GS_CJ_KEY TO GWA_CJ_S.
CLEAR GWA_RETURN.
READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_S.
IF SY-SUBRC = 0.
MOVE GWA_RETURN-MESSAGE TO GWA_CJ_S-MSG.
CLEAR GWA_RETURN.
READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_I.
IF SY-SUBRC = 0.
CLEAR GWA_CJ_E.
CONCATENATE GWA_RETURN-MESSAGE GWA_CJ_S-MSG INTO GWA_CJ_E-MSG SEPARATED BY GC_PIPE_FORMAT.
MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
APPEND GWA_CJ_E TO GIT_CJ_E.
GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
ELSE.
IF P_TEST NE GC_X.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = LV_WAIT.
REFRESH:LIT_POSTING ,
LIT_WTAX_ITEMS ,
LIT_SPLIT_POSTINGS ,
LIT_CPD .
CLEAR: LV_BEG_BALANCE ,
LV_TOTAL_RECEIPTS ,
LV_TOTAL_PAYMENTS ,
LV_TOTAL_CHECKS ,
LV_RUN_BALANCE ,
LV_RUN_CASH_BALANCE ,
LV_NUMB_OF_REC ,
LV_NUMB_OF_PAYM ,
LV_NUMB_OF_CHECKS .
CALL FUNCTION 'FCJ_GET_DATA_FOR_SCREEN'
EXPORTING
I_COMP_CODE = GS_CJ_KEY-COMP_CODE
I_CAJO_NUMBER = GS_CJ_KEY-CAJO_NUMBER
I_DISPLAY_PERIOD_LO = GS_HEADER_BAPI-PSTNG_DATE
I_DISPLAY_PERIOD_HI = GS_HEADER_BAPI-PSTNG_DATE
IMPORTING
E_BEGINNING_BALANCE = LV_BEG_BALANCE
E_RUNNING_BALANCE = LV_RUN_BALANCE
E_RUNNING_CASH_BALANCE = LV_RUN_CASH_BALANCE
E_TOTAL_RECEIPTS = LV_TOTAL_RECEIPTS
E_TOTAL_REC_NUMBER = LV_NUMB_OF_REC
E_TOTAL_PAYMENTS = LV_TOTAL_PAYMENTS
E_TOTAL_PAYM_NUMBER = LV_NUMB_OF_PAYM
E_TOTAL_CHECKS = LV_TOTAL_CHECKS
E_TOTAL_CHECKS_NUMBER = LV_NUMB_OF_CHECKS
TABLES
E_POSTINGS = LIT_POSTING
E_WTAX_ITEMS = LIT_WTAX_ITEMS
E_SPLIT_POSTINGS = LIT_SPLIT_POSTINGS
E_CPD = LIT_CPD.
CALL FUNCTION 'FCJ_POST_ALL'
EXPORTING
I_COMP_CODE = GS_CJ_KEY-COMP_CODE
I_CAJO_NUMBER = GS_CJ_KEY-CAJO_NUMBER
I_CURRENCY = GS_HEADER_BAPI-CURRENCY
I_TYP = 'R'
I_DISPLAY_PERIOD_LO = GS_HEADER_BAPI-PSTNG_DATE
I_DISPLAY_PERIOD_HI = GS_HEADER_BAPI-PSTNG_DATE
* IMPORTING
* E_ERROR_NUMBER =
TABLES
ITCJ_POSTINGS = LIT_POSTING
ITCJ_WTAX_ITEMS = LIT_WTAX_ITEMS
ITCJ_SPLIT_POSTINGS = LIT_SPLIT_POSTINGS
ITCJ_CPD = LIT_CPD
CHANGING
P_BEG_BALANCE = LV_BEG_BALANCE
P_TOTAL_RECEIPTS = LV_TOTAL_RECEIPTS
P_TOTAL_PAYMENTS = LV_TOTAL_PAYMENTS
P_TOTAL_CHECKS = LV_TOTAL_CHECKS
P_RUN_BALANCE = LV_RUN_BALANCE
P_RUN_CASH_BALANCE = LV_RUN_CASH_BALANCE
P_NUMB_OF_REC = LV_NUMB_OF_REC
P_NUMB_OF_PAYM = LV_NUMB_OF_PAYM
P_NUMB_OF_CHECKS = LV_NUMB_OF_CHECKS.
COMMIT WORK.
ENDIF.
APPEND GWA_CJ_S TO GIT_CJ_S.
GV_SUCCESS_RECORDS = GV_SUCCESS_RECORDS + GC_1.
CLEAR GWA_CJ_S.
ENDIF.
ENDIF.
ELSE.
CLEAR GWA_CJ_E.
MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
APPEND GWA_CJ_E TO GIT_CJ_E.
GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
ENDIF.
ENDIF.
ELSE.
GWA_RETURN-MESSAGE = 'Transaction Name does not correspond to any Transaction Number'(017).
CLEAR GWA_CJ_E.
MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
APPEND GWA_CJ_E TO GIT_CJ_E.
GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
ENDIF.
ENDLOOP.
ENDFORM. " SUB_BAPI_CALL -
How to reverse the cash journal posted entries in FBCJ
Hi All
In Cash journal (FBCJ) user has posted the document by mistakenly two times, is it possible to reverse the cash journal posted document. Please advise how to reverse the posted cash journal entries.
Regards
K.GunasekarHi,
For reversing, select the line and then go to "Edit > Delete Entry (Shift+F2)" or "Delete Row" button at the bottom part of screen. (Deletion function reverse the document in FBCJ)
However in case you are trying to reverse the entry after printing a receipt if you must implement OSS Note 359656 first:-
[https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=359656]
Regards,
Gaurav -
Error within Manual Journal Posting
Dear All,
Presently I am using Oracle R12.1.1. While making Manual Journal Posting I am getting the below error.
Error6 - Showing an unbalanced journal entry but suspense not allowed
Kindly guide to solve this issue.
Regards
HPHi Hitesh,
In R12 the functionality for suspense accounting is slightly changed: having an account code entered at ledger level means suspense accounting is enabled.There is no longer a checkbox to enable/disable suspense accounting.
To define a suspense account:
1. Navigate to the Suspense Accounts window.
2. Specify the Ledger.
3. Specify the Source and Category that applies to the suspense account you are defining.
The default suspense account you specified when you defined your ledger appears with the source and category Other. You can define additional suspense accounts using Other for either the source or the category, but not both.
Note that if you update the suspense account in the Ledger Options page in Accounting Setup Manager, the default suspense account is updated in the Suspense Accounts window. Likewise, if you update the default account in the Suspense Accounts window, the account in the Ledger Options page is updated.
4. Enter the Account against which the balancing amount should be posted. You can assign multiple unique combinations of source and category to a single account.
Dirk -
*FBCJ - CASH JOURNAL POSTING - ABAP RUN TIME ERROR*.
Hai,
My problem is, while FBCJ cash journal posting, Error message comes as Programme terminated, short dump is beeing formatted. The screen is quitting out to ABAP RUN TIME ERRORS. Short text of error message- For object, CAJO_DOC2 101, numer range interval 01 does not exist.( I have given the number range, but result is same.) - Pls advice, document type for cash journal is DZ ?.expecting valued support- Iam working on SAP R/3 4.7 enterprise.- TITUS GEORGE.Hi,
GOto SNUM, Input CAJO_DOC2...
Click on change and click on document number ranges.
Maintain the document number ranges for your company code..
That should solve the problem.
Good Luck
Cheers,
Redoxcube -
JOURNAL POSTING시 ERROR10에 대한 원인 및 조치사항
제품 : FIN_GL
작성날짜 : 2004-05-19
JOURNAL POSTING시 ERROR10에 대한 원인 및 조치사항
======================================
Problem Description
Journal Posting시 Error10이 발생할 경우에 대한
원인 및 조치사항에 대해 언급한다.
ERROR10: Showing unbalanced intercompany journal entry
(오류10 - 대차 불일치 본지사 분개 입력 표시중)
Solution Description
Error10은 말그대로 Company segment별 금액의 총합에 대해
대/차가 맞지 않아 발생하는 Error이다.
그렇기 때문에, 해당 Journal Line level에서 Code조합에 대해
Company Code값이 정상적으로 들어가 있는지, Company Code별 대/차는
정확하게 일치하는 지를 확인해보면, 해당 오류를 해결할 수 있다.
Journal수정 후 Unposted상태로 바꾸기 위해서는
To change the status of the batch to UNPOSTED:
1. Navigate to Journals -> Enter
2. Query the batch with the problem
3. Press Review Batch button
4. Overwrite any letter in the Description field (marking it as changed)
5. Save
6. Navigate to Journals -> Post
7. Query the batch
8. It is now available for posting
위와 같은 작업을 해주거나, Table level에서 Status를 "U"로 update해주면 된다. -
Oracle.apps.gl.Journals.journal.post event parameter
I have written a subscription on the oracle.apps.gl.Journals.journal.post event and it's raising fine and I would like to control this event's subscription to a particular set of books id instead of firing across all set of books. How can I send the parameter to my event subscription?
Thanks,
Srini CThe note shows the raising the subscription, I have successfully generated the subscription but I need to know the how can I pass the set of books id to my custom subscription.
Thanks,
Srini C -
Hi guys,
We are facing a typical problem with cash journal posting using transaction code fbcj. It is showing the error message as Tax-code is not defined for jurisdiction code. Where do we make these settings?
Please help me out
chintuHi,
Goto SPRO path as below and define Jurisdiction code
Financial Accounting (New) -Financial Accounting Basic Settings (New) -Ledgers
Global Parameters for Company Code -Document -Tax on Sales/Purchases -Basic Settings -Check Calculation Procedure -Assign Country to Calculation -Procedure -Check and Change Settings for Tax Processing -Specify Structure for Tax Jurisdiction Code -Define Tax Jurisdictions
Rgds
sunfico -
Additional Reference Field for Journal Posting
Hi,
1. I would like to have other 2 additional reference fields (not exceed 10 characters) for Journal Posting.
Other than Assignment field, Reference, and Text field
2. For assignment field, if I didn't key in anything, why sometimes this field auto input the date for me?
Kindly advice. Thank you.
SirirakHi
1) Make use of Reference field 1,2 & 3
2) Assignment field would be default populated by values based on 'Sort key' stored in respective GL master
Thank You, -
Dear All,
I'm new to SAP Accounting, Can some one please explain the below journal posting when i generate the Invoice.
My doubt is why it is taking Raw Materials Account while posting invoice. I tried this entry in SAP 8.8 Demo Database (OEC Computers India)
# G/L Acct/BP Code G/L Acct/BP Name
1 RM0001 M/S Pruksa India Pvt. Ltd. 46777.5 Db
2 207000 VAT Payable (output Tax) 2227.5 Cr.
3 400000 Sales Revenue (Domestic) - Product No.1 44550 Cr.
4 130000 Raw Materials 1192500 Cr.
5 500025 Finished Goods - Cost of Goods Sold 1192500 Db
Thanks in AdvanceHi,
It seems that you are entering a stand-alone AR Invoice. In independent or stand-alone AR Invoice, the first lines are booking of the amount to the Business Partner and the sales account.
However, as the stock has also moved out, the recording for the Material and the COGS account needs to be booked. Hence, like in your journal entry, line 4 and 5.
If the AR Invoice would have been based on the Delivery, then already in the Delivery movemen tof stock is recorded hence in AR Invoice only the sales account and the Business Partner with tax will be displayed to be booked.
Kind Regards,
Jitin
SAP Business One Forum Team -
Production Order Journal Posting
Hi All,
Does anyone have a document that show the Journal Posted from the various stages of a Production Order?
Any reply would be helpful.
Best regards
EarlHi,
You may refer sap implementation guide TB 1000.
Given below is the link to download that document fro 2007 A releases
https://websmp109.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000727177&_SCENARIO=01100035870000000183&_ADDINC=011000358700001192682007E&
Regards,
Senthil Maruthappan. -
Dear Experts,
I have two questions in journal postings in SAP BPC.
1. I wanted to know, how does system picks up Journal ID number when we post a particular JV in BPC? (Like in R/3 we give number range for a document type, is there any place in BPC configuration where we need to maintain the number ranges)
2. In Journal posting in BPC I am able to save the Journal but I am not able to post the same. That means after saving the journal when i click on Post the journal system remains in the same way and I am not able to view the data in the infocube?
Your response is highly appreciated.
Regards
PaulHi Ritesh,
Have you checked the Member Access Profiles and made sure that the existing members you are trying to post exist within the profile? Are there work status locks?
If possible (if you are in a dev environment) delete the work status locks (if there are any) and attempt to re-post the journal entries. If that still doesn't work at that point I would check whether or not your authorizations are the issue. An easy way to do this is to assign yourself the FULL_MBR profile making sure that the profile is up to date including security for each application within your AppSet.
If you have done all of the above and you are still having trouble posting I would check that you are posting members with the correct case (in BPC NW the account "cash" and the account "CASH" are two separate and distinct accounts). Case sensitivity is one of those things you should always be cognizant of when working in a BPC NW system which is quite different from BPC MS if that is what you are accustomed to.
Hope this is helpful.
Cheers, Scott -
Dear all,
While posting a transaction in cash journal, I am getting the following message -
For object CAJO_DOC2 1111, number range interval 01 does not exist.
Message no. NR751
Diagnosis
The database table NRIV has the delivery class 'C', i.e. the SAP default settings are only in client 000.
Procedure
Create the missing number range interval in customizing.
I have created a doc type (CN) & no range (CN) for cash journal in customising & assigned the same to the doc type.
How to move ahead on this?
Thanksyou have to assign number ranges for cash journal in cash journal customization
-
Journal Posted in Summary but not drill downed
In Journal ledger i have posted the journal from projects as Summary when goto drll down,it not reflecting the data.
Navigation
General Ledger-->Journals-->Ente-->Review General-->Tools-->Drilldown
Drill Down is showing empty because it posted in Summarycan you please have a look into your COPA table CE1xxxx (op concern) via SE11/16 and tell me with which TIMESTAMP was your document posted?
Filter something like
PALEDGER 10
VRGAR
VERSI
PERIO
PAOBJNR
PASUBNR
BELNR <your doc num>
POSNR
please let me know,
Olivier.
Maybe you are looking for
-
How do I get rid of the "other" category on my iPad Air?
iTunes is saying that "other" occupies 1.97GB out of my 16GB tablet and I need to learn how to remove it. I am a long-time apple user with all the apple devices, but can't seem to figure out what causes the "other" category to be so large on any of m
-
Error: Derivation Source object, DIMENSION_NAME , is not correctly bound
Hi, I have installed Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 and OWB 10.2.0.1.0 on Windows XP Professional. I've created a simple MOLAP dimension with a default hierarchy and one level within it. I've maped it to source table, deplo
-
Satellite P300-150 PSPC4E: Cannot get Express Card slot working with XP
Hello. I have downgraded to XP on my machine and unfortunetly I am unable to get the Express card slot to work. The Intel chipset drivers on the Toshiba site haven't dont anything. I am trying to get an eSata port working via the express card like I
-
How to export bookmarks and settings to a new computer
how do I export my bookmarks, firefox settings and passwords to a new computer
-
Logic crashes when saving on Mavericks
Heeelppppp Logic pro 9 version 9.1.8. crashes during save as on Mavericks Dump follows Process: Logic Pro [60303] Path: /Applications/Logic Pro.app/Contents/MacOS/Logic Pro Identifier: com.apple.logic.pro Version: 9.1.