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: 

User exit for mr8m.

Former Member
0 Kudos

Hi,

I am using a user exit for mr8m transaction for invoice cancellation.

my requirement is i should copy the po text(txz01) and update into the text field(sgtxt) of drseg table in case sgtxt is initial.

now the problem i get is in the FM 'MRM_INVOICE_CREATE' after this the purchase order data gets cleared after this due to some settings and flags.

now i am trying to read the vtext from the table t685t but i am unable to get this value as the condition type kschl is also blank in this user exit.

can you tell me a way as of how to read the kschl value of the items in the purchase order.

or can you suggest any other way to read the txz01 field in this user exit.

the user exit i am using is EXIT_SAPLMRMP_004. Enhancement-LMR1M004.

Thanks in advance.

Lavanya.

i.e, the customer-function 004

2 REPLIES 2

furlan
Participant
0 Kudos

Hello,

Some time ago, I had the similar problem. So, I review the standard program (before and after exit calling) and found the internal table that have the data that you want, generally is the table that the system move to itables at exit calling. So, I got the values from this table through field symbol assign.

Try to change the field using field symbol assign

Field-symbols: <fs> type [type field].

ASSING('(prgname)tab-field') to <fs>.

where prgname, is the program name where you can find the fild (at screen) and tab-field is the field name.

<fs> = some value.

This is not the most elegant solution, but it can help you.

Regards!

Furlan

Former Member
0 Kudos

If you look at the documentation of this user exit, it has exactly the same example, as your requirement is.


Source text example:
IF TAB_DRSEG-MATNR IS INITIAL.
  E_SGTXT = TAB_DRSEG-TXZ01.
ENDIF.

So isn't this what you need to do in your include. Read the line of the internal table TAB_DRSEG and move the value of TXZ01 to E_SGTXT as above.

Srinivas