Skip to Content
0
Former Member
Jun 25, 2009 at 12:04 PM

Exit_SAPLF048_001 Exit_SAPLF048_002

1796 Views

Hi abap experts,

I have a requirement when posting a financial doc to fill BSEG_SGTXT with BSEG_BELNR.

I cannot do this using substitution because BSEG_BELNR = $1 and not populated till the last moment before posting.

I did however find the following 2 exits where BSEG_BELNR is populated before being posted:(Exit_SAPLF048_001 and Exit_SAPLF048_002).

so far so good.... in enhancement F180A001 and Exit_SAPLF048_001 and include zxf048u01, I amanged to code the following:

data: ls_item type f180a_doc_item,

ix type i.

loop at doc_item_tab into ls_item.

ix = sy-tabix.

if ls_item-hkont = '0000160050'.

concatenate ls_item-belnr ls_item-gjahr

into ls_item-sgtxt.

modify doc_item_tab from ls_item

index ix

transporting sgtxt.

endif.

endloop.

I added a breakpoint to my code and discovered that even thought BSEG_SGTXT was populated correctly, BUT once the control was returned to the calling program the changes were lost..... so clearly I cannot use this Exit.

Can any abap guru tell me if using F180A001 and Exit_SAPLF048_002 and include zxf048u02, I will be able to modify BSEG?. else is there any other exit available to do this?

Any help will be appreciated.

Seve (FI Functional consultant)