cancel
Showing results for 
Search instead for 
Did you mean: 

modifying MEDRUCK

Former Member
0 Kudos

Hi friends,

I have a requirement to modify the Standard PO script (MEDRUCK) and also the associated driver program. I have designed the layout but how to create the custom driver program for this . THe new form has to trigger print command is issued from ME21n/ME22n/ME23n.

If somebody has a sample code for the custom driver program, can u please forward it to me....

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

former_member778253
Active Participant
0 Kudos

Hi

You have modified sapscript (medruck) and now you want to change your print program or you want to use the same one.

Either of the cases, just assign your form name and print program name to one output type in nace transaction with printout as transmission medium.

Goto nace tcode:

select Application (EF) - purchase order

click on output types button.

ask your functional consultant to create one output type against 'EF'.

then assign your form name and print program to the output type with transmission medium as '1' (print output)

now, you can print your form output thru me21/me22/me23 transaction.

hope you got the answer.

Former Member
0 Kudos

First of all thanks for the reply,

but the issue I'm facing is with the print program, the print program has to be developed from the scratch because even the form has been developed from the scratch by me....Now how to get the value of the PO from which print command has been issued in the print program??

former_member156446
Active Contributor
0 Kudos

the initial base should be from the SAP std. print program... that makes things lot easier than creating from scratch.. copy it to a Z and modify as per your requirements... you have full control on Z print program...

Former Member
0 Kudos

Yes, as you said it is better to copy the std. But can u tell me how to proceed if I'm going to develop it from the scatch...bcoz that is what is my requirement.

While developing the print prog. the problem I'm facing is fetching the data because , how would I know from which purchase Order the print command is issued because I need to get data for that PO only??

I heard that it comes through NAST table....I'm still not sure

Former Member
0 Kudos

Hi,

Please use the below code

DATA : s_billno TYPE vbrk-vbeln.

s_billno = nast-objky.

Here , s_billno is the selection screen pono wherein you will give the purchase order number.

Have u given the print program name and the sapscript name in transaction NACE ?

Former Member
0 Kudos

Hi,

What you heard is rite. The runtime data will be hold in NAST record. The objectkey is the field that holds the PO number.

If you go through the standard print program you will understand what FMs are needed to fetch the required data.Then you implement the same in the custom program.

Regards,

Aditya

Answers (0)