Skip to Content
0
Former Member
Jul 04, 2016 at 03:52 PM

Problem with KOMFKGN

156 Views

Hello,

I extends the structure KOMFKGN of the new field ZZVALUE01 and I would put the value in the table VBRP. I have append structure in Table VBRP.

The value is inbound in e1wxx01 segment of WPUUMS idoc.

I found information that I should use IF_BADI_WPOS_WPUUMS~CHANGE_APPLICATION_DOCUMENTS. I write this:

FIELD-SYMBOLS: <fs_komfkgn> TYPE komfkgn.

FIELD-SYMBOLS: <fs_e1wxx01> TYPE e1wxx01.

FIELD-SYMBOLS: <fs_edidd> TYPE edidd.

LOOP AT cs_application_data-idoc_segs-edidd ASSIGNING <fs_edidd> WHERE segnam = 'E1WXX01'.

ASSIGN <fs_edidd>-SDATA to <fs_e1wxx01> CASTING.

if <fs_e1wxx01>-FLDNAME = 'DWSPRZZAK'.

loop at cs_application_data-dc_komfkgn ASSIGNING <fs_komfkgn>.

IF sy-subrc = 0.

lv_fldval = <fs_e1wxx01>-fldval.

<fs_komfkgn>-zzvalue01 = lv_fldval.

ENDIF.

endloop.

But after this the field in table in empty. Do I need to additionally change somewhere in SAP configuration ?