Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding line posting

sreeramkumar_madisetty
Active Contributor
0 Likes
318

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
296

Try:

IF l_amount+12(1) EQ '-'.

Rob

1 REPLY 1
Read only

Former Member
0 Likes
297

Try:

IF l_amount+12(1) EQ '-'.

Rob