cancel
Showing results for 
Search instead for 
Did you mean: 

Need to print PO Text in Smart Form

Former Member
0 Kudos

Hi,

I have created a new smart form to replace MEDRUCK Script.I copied the standard Program to custom,and replaced the ME_PRINT FM in Form Create_neu with my smart form FM.Now my problem is in Smarat form I need to print the Text like "NEW Purchase Order" or "Change Purchase Order" on the top of smart form.How do I know whether its a new PO or Changed PO.We call it from ME22N/ME9F.Please help me in this.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello Praveen,

You need to check the NAST structure for field {bold}VSTAT{bold} if this field is having 0 then its a New Purchase order otherwise its Change Purchase Order.

Apart from this you can also check in table CDHDR usin EKKO and your PO number combination as Object key and check for the field CDCHNGINDH. If this contains I then its New Purchase Order or if its U then its Changed.

<ponits begging removed by moderator>

Thanks,

Praveen Khanna

Edited by: Thomas Zloch on Mar 21, 2011 5:47 PM

Answers (2)

Answers (2)

former_member217546
Participant
0 Kudos

hi check for the tcode in NAST STRUCTURE...

marcin_cholewczuk
Active Contributor
0 Kudos

Hi,

This is not exactly smart form problem. The first most obvious solution is to check transaction code (sy-tcode). In most cases transactions to create and change object are different. If this won't help then you'll have to investigate in debuger what data are storred in memory like locals, globals or even stack. This is not much of help but maybe it will lead you to right solution.

Best regards

Marcin Cholewczuk