‎2007 Oct 03 1:56 PM
Hi Friends
I want to post the data into my final structure.
Here I want to create 2 line items for final structure 1for debit entry and the other for credit entry.
I am writing the following logic:
DATA: l_wa_a_efund_map LIKE LINE OF me->ai_efund_map .
data: l_amount(13) type c.
READ TABLE me->ai_efund_map INTO l_wa_a_efund_map WITH
KEY efundtrans = me->a_input_line-efundtrans+12(4).
l_amount = me->a_input_line-ammount.
IF sy-subrc = 0.
IF l_amount12(1) EQ ''.
newbs = l_wa_a_efund_map-post_key_debit.
ELSE.
newbs = l_wa_a_efund_map-post_key_credit.
ENDIF.
ELSE.
exit.
Here me->a_input_line-ammount is coming from the input file.
there if it is me->a_input_line-ammount is positive first time the code written is correct and it should execute same way.
newbs = l_wa_a_efund_map-post_key_debit.
second time me->a_input_line-ammount should be negative and
newbs = l_wa_a_efund_map-post_key_credit.
has to be exceted for the second line item.
this is vice versa means :
there if it is me->a_input_line-ammount is negative first time the code written is correct and it should execute same way.
newbs = l_wa_a_efund_map-post_key_credit.
second time me->a_input_line-ammount should be positive and
newbs = l_wa_a_efund_map-post_key_debit.
has to be exceted for the second line item.
Please suggest me the logic for this.
Points are assured for useful answers.
Regards,
Sree
‎2007 Oct 03 2:53 PM
‎2007 Oct 03 2:53 PM