2 weeks ago
in my gt_sum table i have list of profit centers ,and for each profit centers 3 gl accounts of posting key 40 , 40 and 50 .
here after the loop i am calling the bapi_acc_doc_post , but i am getting the inconsistent currency information error , could you please assist me on the below code
LOOP AT gt_sum INTO DATA(lw_sum1).
lw_accountgl-itemno_acc = '1'.
lw_accountgl-gl_account = '1040107010'.
lw_accountgl-item_text = w_docheader-header_txt.
lw_accountgl-profit_ctr = lw_sum1-prctr.
APPEND lw_accountgl TO i_gl_acc .
lw_accountgl-itemno_acc = '2'.
lw_accountgl-gl_account = '1040108010'.
lw_accountgl-item_text = w_docheader-header_txt.
lw_accountgl-profit_ctr = lw_sum1-prctr.
APPEND lw_accountgl TO i_gl_acc .
w_curr_amt-itemno_acc = '1'.
w_curr_amt-curr_type = '00'.
w_curr_amt-currency = 'INR'.
w_curr_amt-amt_doccur = lw_sum1-freight_lc1.
APPEND w_curr_amt TO i_curr_amt .
w_curr_amt-itemno_acc = '1'.
w_curr_amt-curr_type = '10'.
w_curr_amt-currency = 'INR'.
w_curr_amt-amt_doccur = lw_sum1-freight_lc1.
APPEND w_curr_amt TO i_curr_amt .
w_curr_amt-itemno_acc = '1'.
w_curr_amt-curr_type = '31'.
w_curr_amt-currency = 'USD'.
w_curr_amt-amt_doccur = lw_sum1-freight_lc2.
APPEND w_curr_amt TO i_curr_amt .
w_curr_amt-itemno_acc = '2'.
w_curr_amt-curr_type = '00'.
w_curr_amt-currency = 'INR'.
w_curr_amt-amt_doccur = lw_sum1-duty_lc1.
APPEND w_curr_amt TO i_curr_amt .
w_curr_amt-itemno_acc = '2'.
w_curr_amt-curr_type = '10'.
w_curr_amt-currency = 'INR'.
w_curr_amt-amt_doccur = lw_sum1-duty_lc1.
APPEND w_curr_amt TO i_curr_amt .
w_curr_amt-itemno_acc = '2'.
w_curr_amt-curr_type = '31'.
w_curr_amt-currency = 'USD'.
w_curr_amt-amt_doccur = lw_sum1-duty_lc2.
APPEND w_curr_amt TO i_curr_amt .
lw_accountgl-itemno_acc = '3'.
lw_accountgl-gl_account = '6030201020'.
lw_accountgl-item_text = w_docheader-header_txt.
lw_accountgl-profit_ctr = lw_sum1-prctr.
APPEND lw_accountgl TO i_gl_acc .
w_curr_amt-itemno_acc = '3'.
w_curr_amt-curr_type = '00'.
w_curr_amt-currency = 'INR'.
w_curr_amt-amt_doccur = - ( lw_sum1-freight_lc1 + lw_sum1-duty_lc1 ).
APPEND w_curr_amt TO i_curr_amt .
w_curr_amt-itemno_acc = '3'.
w_curr_amt-curr_type = '10'.
w_curr_amt-currency = 'INR'.
w_curr_amt-amt_doccur = - ( lw_sum1-freight_lc1 + lw_sum1-duty_lc1 ) .
APPEND w_curr_amt TO i_curr_amt .
w_curr_amt-itemno_acc = '3'.
w_curr_amt-curr_type = '31'.
w_curr_amt-currency = 'USD'.
w_curr_amt-amt_doccur = - ( lw_sum1-freight_lc2 + lw_sum1-duty_lc2 ) .
APPEND w_curr_amt TO i_curr_amt .
clear : w_curr_amt , lw_accountgl .
ENDLOOP.
User | Count |
---|---|
76 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.