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

classical report based on partner function

Bharath84
Participant
0 Likes
436

Hi All,

In my classical report I need to add two columns Customer No. and Billing Co.Code both from E1EDKA1–LIFNR.

if PARVW = RS it should be populated in Customer No.

if PARVW = BK it should be populated in Billing Co.Code.

Below is the code I have added.

select docnum sdata into table t_edid4_lifnr

           from edid4

           for all entries in t_it

           where docnum = t_it-docnum

           and segnam = 'E1EDKA1'.

  loop at t_edid4_lifnr where docnum = t_it-docnum.

  read table t_edid4_lifnr with key docnum = t_it-docnum.

  if sy-subrc = 0.

    if t_edid4_lifnr-sdata+0(3) = 'RS'.

      move t_edid4_lifnr-sdata+20(17) to v_custno.

    elseif t_edid4_lifnr-sdata+0(3) = 'BK'.

      move t_edid4_lifnr-sdata+20(17) to v_compco.

  endif.

  endif.

  endloop.

But for some document numbers having PARVW = RS or BK, still those records are not coming in the output.

Please help me.

Thanks,

Haritha

1 ACCEPTED SOLUTION
Read only

prakashjasti
Contributor
0 Likes
380

Hi,

Please check the statements

here you were comparing 3 digits with two characters.

if t_edid4_lifnr-sdata+0(3) = 'RS'.

elseif t_edid4_lifnr-sdata+0(3) = 'BK'.

Regards,

Prakash.

Prakash J
2 REPLIES 2
Read only

prakashjasti
Contributor
0 Likes
381

Hi,

Please check the statements

here you were comparing 3 digits with two characters.

if t_edid4_lifnr-sdata+0(3) = 'RS'.

elseif t_edid4_lifnr-sdata+0(3) = 'BK'.

Regards,

Prakash.

Prakash J
Read only

0 Likes
380

Hi Prakash,

This doen not give any change in the output. I have checked the idoc number in WE02 where PARVW is having RS. But the record with this idoc number is not coming in the output.

Please advice.

Thanks,

Haritha