Skip to Content
0
Former Member
Nov 09, 2011 at 10:15 PM

User Exit to bring BELNR from BSEG Table

83 Views

HI There,

Can someone please help me how to resolve this problem.

Created a Generic Datasource based on Table PAYR and trying to enhance the datasource with BELNR

field from BSEG table. I've taken the common fields as BUKRS, GJAHR & LIFNR but it seems to be not working.

LIFNR in PAYR is not populating the data. So this field cant be used. Then I equated AUGBL (Crearing doc num)

with VBLNR (Posting doc num) but its not working either.

Is Clearing doc Num (AUGBL) and Payment Doc Num (VBLNR) are same?

Can some please explain me clearly...

Please go through the below code and please some one suggest me how to make it work?

FIELD-SYMBOLS <FS_DATA1> TYPE ZOXDE30123.

CASE I_DATASOURCE.

WHEN 'ZDSPPLIST'.

CHECK NOT C_T_DATA[] IS INITIAL.

LOOP AT C_T_DATA ASSIGNING <FS_DATA1>.

SELECT SINGLE BELNR FROM BSEG

INTO <FS_DATA1>-BELNR

WHERE BUKRS = <fs_data1>-ZBUKR

AND AUGBL = <fs_data1>-VBLNR

AND GJAHR = <fs_data1>-GJAHR.

MODIFY c_t_data FROM <fs_data1>.

ENDLOOP.

ENDCASE.

Thanks for your time

Vandana