cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript (Medruck)

Former Member
0 Kudos

Hi Experts

Can anybody please give me the acutal scenario how modifications are done in the Industry in an existing form (through print program or anything else) as I am fresher and have to mention in resume that i worked on SAPscript/Smartforms.

I will be thankful to you if anybody can give me specifiactions(live) along with some idea about how modifications are done and on which point one has to concentrate

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Rashmi,

For SAP Scripts, you usually copy that form into a custom one and make modifications according to the customer requirements, like printing the line items along with the scheduling details, printing terms and conditions, printing details of the material etc etc.

Regards,

Ravi

Former Member
0 Kudos

Thanks for your reply Ravi

Can you please tell me can we know print program of form from the form or how can we know the program of any form.

I tried it thrugh table tnapr, but therre are number of programs for a single form Medruck. I din understand and simply selected one and than i have given that name in SE38 but ther was a message like this program doesnt exist. Plz correct me wherever I was wrong .

Thanks

Former Member
0 Kudos

Hi Rashmi,

to find the print program of a standard script, goto Check>Texts>enter>u ll c one or more print program>select one>enter> it shows if there r any errors--> the one with NO errors will normally be the relevant print program...

the remaining programs will be relating to the same functionality, but this program is the one which will pass the data to the script...

hope it helps,

Regards,

Bikash

Former Member
0 Kudos

hi ravi...

can u send me one full business scenario to modify the purchase order..the actual scenario.. i'll be thankfull to u

br

bhanu

Answers (7)

Answers (7)

Former Member
0 Kudos

Hello Rashmi,

Hi Rashmi,

u cannot use RSNAST00 program directly it is called by the std SAP program when u are saving the PO. U can check the progrm in SE38 ->RSNAST00 (last char are digit 0 and not char o).

As for OLME it should show u Purchasing structure. In that u should c Messages around 26th line from the top.

Once u c it click on it. Within that click on Assign Form and Output Program for Purchase Order. Here for the output type which in ur case is NEU and medium as 1 u assign ZSAPFM06P with form routine as ENTRY_NEU and form as MEDRUCK.

as for the line number if u open the RSNAST00 program and goto line 874 u will

<b> PERFORM (tnapr-ronam) IN PROGRAM (tnapr-pgnam) USING returncode

us_screen

IF FOUND.

</b>

this is the place from where a call to ur program (ZSAPFM06P) will be made

Former Member
0 Kudos

Hi All

using transaction OLME, SPRO, se71 all I tried but not successided to get values in place of those crosses in Purchase Order .. I think after getting in Industry only I will come to know

Anyways lastly if anybody can tell how to fetch data from database so as to get values in place of crosses in MEDRUCK.. really I will be thankful..

Otherwise lastly am closing this thread

Thanks to all for giving a lot of replies

Former Member
0 Kudos

Hi All

Atlast I got it

Actually this is not our job

for getting values in places of crosses , first we need to assign print program to form (as discussed above)and then transaction,

so when enduser will use it.. at that time we will get all the values on the form

Our job is just to make modifications in Layout, paragraph formats, charater formats, header data and documentation and for all these things we don need print program

Rarely we need to modify print program and when we really need it then ..

its in deep and I will get it when I wil be there

I hope am right this time..

Anyways , thanks to all for giving number of replies

Former Member
0 Kudos

Rashmi,

More often than NOT you will see the print program is being changed to accomodate the changes required for the Script. I would say its a pretty common situation. And when you do the changes, its your job to do a end to end testing and see that the values are coming as expected.

Anyways, Please close the thread and mark all the helpful answers.

Regards,

Ravi

Former Member
0 Kudos

Hello Rashmi,

The entire scenario is like this...

The configuration part which u need to do is through OLMe. In this go to messages-> Assign forms and output program to purchase. In this u assign for each output type a medium i.e how u want to output the PO and for each medium program with an entry point. Now based on the discussion u have copied SAPFM06P program as Z. U will have to create and entry for this Z program. so ur entry will look like

NEU Purchase order 1 ZSAPFM06P ENTRY_NEU MEDRUCK

the other std entry will have to be deleted as the key for the table is output type and medium.

Now the process of printing. When u create or change any PO, in simple form an output is generated based on what is the setting in the message. Say u go to PO->messages. Select the message and click further data, u will c dispatch time which indicates when will the pO be generated. If it set to send immediately when saving then it will create a message when u save. While in the process of saving the std SAP program access RSNAST00 program and through this program (line 874) it dynamicall acess the configuration and gets the FORM entry name and the program.

Former Member
0 Kudos

Hi Abhijit

I tried using RSNAST00 program..it says this program doesnt eixst

Also in transaction OLME.. i was unable to see Messages option anywhere

Secondly can you please tell me how to create entry for this zprogram and where to create it

and how to know line no 874

Plz repet the steps clearly if you can

Thanks in advance

Former Member
0 Kudos

THanks a lot

I will do it

in case any problem comes..

will get back again

Thanks once again

Former Member
0 Kudos

Hi All

that program (SAPFM06P) is subroutine pool and not executing

plz tell me how to get print program of Medruck or how changes are done in this form or how to get values in place of crosses??

Thanks

Former Member
0 Kudos

Rashmi,

In fact the program is a subroutine pool and the subroutine ENTRY will be called dynamically by the standard program when you printing the order from the transaction. This program cannot be executed individually.

In order to modify this, copy SAPFM06P into ZSAPFM06P and change the configuration so that it points to the new program. Now ENTRY subroutine in ZSAPFM06P will be called. Do the required changes to your script and program and the changes will reflect.

Regards,

Ravi

Former Member
0 Kudos

I did that

I copied that program to zprogram and saved it as executable program but still its not executing

Just tell me how to replace those crosses on the form ..

do we need print program for that??

If we are making changes in the layout then no need of print program??

but then how to exeute or how to get values in places of crosses??

Former Member
0 Kudos

Rashmi,

Even if you copied the program, does the new one, has a start of selection / end of selection events. How does the program look like, does it have any section other than subroutines?

Making changes to the layout does not warrant changes to the print program.

I am not sure about Crosses, but you should put the variable names wherever you want to print the values of the variables.

The program that we are talking about is the print program as that calls the Script.

Regards,

Ravi

Former Member
0 Kudos

OK you just tell me how to test that form

or how to use that form

How do we use already existing forms provided by SAP??

I just want to test/execute that form and want to understand the process

I hope you are getting my question

Thanks

Former Member
0 Kudos

Rashmi,

If you have done the required configuration, then your changes should reflect while printing the FORM from the transaction ME22n. Put a break point in the program (ENTRY subroutine) and add a message output to the PO and save it.

regards,

Ravi

Former Member
0 Kudos

Hi Ravi

I will be thankful to you if you can tell me now whatz this configuration and how do we do it??

In short i want to use this form in order to study it and understand how thing are done actually..

THanks a lot

Former Member
0 Kudos

Rashmi,

Go to SPRO transaction.

SAP Customizing Implementation Guide --> Materials Management --> Purchasing --> Messages --> Forms (Layout Sets) for Messages --> Assign Form and Output Program for Purchase Order

Here you will be able to assign the Program name / Subroutine name (FORM Routine) and the SAP Script (FORM) Name.

Regards,

Ravi

Note : Please mark the helpful answers

Former Member
0 Kudos

Thanks guys for all your efforts

but am keeping this thread open, will get back to you again in case problem arises

Thanks one again

Former Member
0 Kudos

hi ..

1) first of all copy the standard layout and made changes..

2) next step is to run the layout...

u can do this using rsnast00 program..

in se38 write program name and made break point in line 875...

3)now run hte standard transaction.

4) breakpoint ll come..

5) here change the standard layout to zlayout.

6) this how u can check ur changed layout..

if this ll work then i ll tell how to change layout permanently..

fine or i ll send u study material for this...

regards.

Former Member
0 Kudos

Hi guyz m bak here

Hey Madan

whatz that program rsnast00..can you plz bit elaborate it and i will be happy to have study material but if you are talking about those downloaded from web/net.. am already having enough ..what m searching is actual specificaions from which I can have clear idea about work is done in Industry

Thanks

Former Member
0 Kudos

Rashmi,

All these Scripts will be triggered based on something MESSAGE OUTPUT DETERMINATION (Configuration) of each of the business documents. There will a entry made in NAST for each document that has to processed via SCRIPT / SMART Form.

All these messages will be processed by the program RSNAST00 collectively. You can do the settings in such a way that the message of the document is processed immediately as well, so that the SCRIPT is triggered immediately.

Regards,

Ravi

Note :Please close the thread, if answered

Former Member
0 Kudos

Hello Rashmi,

through Se71 u will never get the place holders replaced by actual values. It will just show u how the layout looks like and where all the data if any will be printed.

Secondly in tnapr u will get multiple entries for the program because they are connected to different output types and for different medium. Output types can be purchase order being sent as mail/fax/print out....

Former Member
0 Kudos

Hello Rashmi,

The way u did is also a way to determine to which program the layout is attached but the other way is through customisation. For purchae order go to tcode olme->messages->Forms->Assign forms to putput program for purchase order. Here u can c which is the program to which ur layout set is attached and also the entry pooint the program.

Former Member
0 Kudos

Thanks guys for your replies

but the question is when i have taken name of program from table tnapr then why i was getting message in ABAP editor that program doesnt exist

Secondly what are those number of programs for a single form(Medruck) in table tnapr

and third is , as per the requirments do we need to do the corrections in that program which is attached to layout of that form??

Please give me some practical/actual scenerio

Your guidance is really valuable as well as appreciable

Thanks once again

Former Member
0 Kudos

for form Medruck i find 2 programs in tnapr..

SAPFM06P : this program drives output via sapscript

/SMB40/FM06P : this program drives output via smartforms..

1st program shud be available in ur system..

the 2nd program s available in IDES but to get it in ur development system, u need to upload some smartform program package provided by SAP.this can be done with the help of basis guy..

this is the reason u dont c this program now..

Now, the corrections like changing the LOGO, formatting the output,etc can be done by copying the script/smartform and changing..if some data needs to be modified/changed, then the program needs to be changed after copying it into a Z one..

Hope it helps,

Regards,

Bikash

Former Member
0 Kudos

Thanks again

but tell me onething, when i executed the form Medruck via se71, the program symbols on the printpreview were coming like xxxxxx i.e. their values are not replaced and displayed as crosses, whatz the reason for that??

what do we need to do to get values for all the placeholders on the form

Thanks

Former Member
0 Kudos

and i was getting number of programs in tnapr about 8-10 for the same form medruck

which program do we need to select??

Former Member
0 Kudos

wen u execute a script from se71, u dont have values at present for the variables,ie, the values r to be passed from the program wen we execute the program which calls that script..hence, the crosses appear wen u directly c the preview from se71....

for selecting the program, again as i said among those programs, there may be includes, function groups n reports.. u may not be able to take print directly from se38 for some applications like purchase order(me21n) wherein u get the print from the transaction itself( me21n or me9e).. these programs have been configured to print...sapfm06p is the main program which has several includes...these includes contain function modules that come under a function group..

for PO, report is sapfm06p n function group is medruck..

so there may be several programs mentioned in tnapr but by trial n error u may find out for ur requirement.. as i mentioned earlier, for sapscript n smartforms ther will be different driver programs..

Regards,

Bikash