Application Development 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: 

How to default PO item text

Former Member
0 Kudos
325

hi all,

i am a noob in ABAP, i am hoping all you experts can help me to solve my problem...

i want to default PO item text while i adding each line item, i tried to do it in BADI ME_PROCESS_PO_CUST~PROCESS_ITEM,

LS_LINE-TDOBJECT = 'EKPO'.

LS_LINE-TDID = 'F01'.

LS_LINE-TDFORMAT = '*'.

LS_LINE-TDLINE = 'This is an asset purchase. Please BILL SEPARATELY.'.

APPEND LS_LINE TO LT_LINE.

CALL METHOD IM_ITEM->IF_LONGTEXTS_MM~SET_TEXT

EXPORTING

IM_TDID = 'F01'

IM_TEXTLINES = LT_LINE.

but this do not work when i first type in all the value of the line item, then i run in debug mode to see whether my code is executed, the answer is yes... my code is executed but dont know why the item text is still blank.

i can say my code is correct because when i try to change again the value of that particular line item, the item text is defaulted now.

so i am not sure whether after my first time default code is executed, is there any part of the sap program clear up the item text?

or please advise me which user exit / badi i should use?

thanks a lot for your help

5 REPLIES 5

Former Member
0 Kudos
160

Hi Use BADI : ME_PROCESS_PO_CUST>> Method : PROCESS_ITEM

Former Member
0 Kudos
160

hi thanks for you fast reply,

but my problem still not solved, i am using that badi you mentioned, it can work only when i second time change the value of that particular po line item, i dont know why it cant work while i first adding the line item... any idea?

thanks.

0 Kudos
160

hi,

Try to use SAVE_TEXT function module in that method.

Former Member
0 Kudos
160

hi Gautham Vangaveti,

can you explain more about the SAVE_TEXT you mentioned? how to use it? can give me example?

thanks.

Former Member
0 Kudos
160

Hi all,

is there anybody tried default the PO item text before? i am still struggling with this....

please help...

thanks.