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

need logic for this

Former Member
0 Likes
966

Hi

To get Account document number (BKPF-BELNR), input existing material document number(MKPF-MBLNR) appended with material document year(MSEG-MJAHR) into reference key ( BKPF-AWKEY).

regards,GA

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
828

data : v_awkey like bkpf-awkey.

select mblnr mjahr into corresponding fields of table itab from mseg where....

loop at itab.

concatenate itab-mblnr itab-mjahr into v_awkey.

select single belnr into itab-belnr from bkpf where awkey = v_awkey.

modify itab.

clear v_awkey.

endloop.

regards

shiba dutta

Hi

To get Account document number (BKPF-BELNR), input existing material document number(MKPF-MBLNR) appended with material document year(MSEG-MJAHR) into reference key ( BKPF-AWKEY).

regards,GA

5 REPLIES 5
Read only

Former Member
0 Likes
828

concatnate itab-mblnr itab-mjahr into itab-awkey.

Regards

Prabhu

Read only

Former Member
0 Likes
828

Use concatenate ... if you want all the fields to be displayed into a single field....

I think if I am not mistaken to understand you question..

Regards,

Jayant

Read only

Former Member
0 Likes
828

Hi,

With the help of Reference Document Number (MSEG-XBLNR) u can get Account document number (BKPF-BELNR).

Regards

Gaurav

Read only

Former Member
0 Likes
829

data : v_awkey like bkpf-awkey.

select mblnr mjahr into corresponding fields of table itab from mseg where....

loop at itab.

concatenate itab-mblnr itab-mjahr into v_awkey.

select single belnr into itab-belnr from bkpf where awkey = v_awkey.

modify itab.

clear v_awkey.

endloop.

regards

shiba dutta

Read only

Former Member
0 Likes
828

Data:wa_belnr like BKPF-BELNR.
        
SELECT  mseg~mjahr  INTO    CORRESPONDING   FIELDS OF  TABLE int_outtab

  concatenate mkpf-mblnr mseg-mjahr
where bkpf-awkey = ' '  "specify any value from awkey in that space

Regards,

Pavan