cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent:How to modify a script without changing the print programme

Former Member
0 Kudos

Hi all,

Can any body pls tell me <b>How to modify a script without changing the print programme</b>

Give m esome real time examples.

Good points willbe rewarded

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all,

Can any body please tell me " <b>how to Modify Standard Script MED RUCK".</b>

<b>Please tell me step by step.</b>

like MED RUCK for PO please tell how many standard forms are there for other business scenarios.

Its urgent

good points will be rewarded for satisfactory solution.

regards

tapu

former_member196280
Active Contributor
0 Kudos

You cannot modify the standard form, if you want to modify it, then you have to copy it and make necessary changes.

Goto SE71, Utilities -> copy from client

create a new form name as Z-MEDRUCK and do the necessary changes in Z_medruck.

Regards,

SaiRam

Former Member
0 Kudos

Hi

You can write a external Subroutine to fetch the extra data into the script program

see the following sample code

How to call a subroutine form SAPscripts

The Form :

/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK

/:USING &EKKO-EBELN&

/:CHANGING &CDECENT&

/:ENDPERFORM

The report :

REPORT zkrpmm_perform_z1medruck .

DATA : BEGIN OF it_input_table OCCURS 10.

INCLUDE STRUCTURE itcsy.

DATA : END OF it_input_table.

  • déclaration de la table output_table contenant les

variables exportées

DATA : BEGIN OF it_output_table OCCURS 0.

INCLUDE STRUCTURE itcsy.

DATA : END OF it_output_table.

DATA : w_ebeln LIKE ekko-ebeln,

  • w_vbeln LIKE vbak-vbeln,

w_zcdffa LIKE vbak-zcdffa.

*----


*

  • FORM CDE_CENT

*

*----


*

FORM cde_cent TABLES input output.

it_input_table[] = input[].

it_output_table[] = output[].

READ TABLE it_input_table INDEX 1.

MOVE it_input_table-value TO w_ebeln.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = w_ebeln

IMPORTING

output = w_ebeln.

SELECT SINGLE zcdffa FROM ekko

INTO w_zcdffa

WHERE ebeln = w_ebeln.

it_output_table-name = 'CDECENT'.

MOVE w_zcdffa TO it_output_table-value.

MODIFY it_output_table INDEX 1.

output[] = it_output_table[].

ENDFORM.

COPING SCRIPT

There are some Standard Sap Scripts in SAP. We cant directly execute them in scripts we have to use some T-codes and by giving some input to the required fields we can see the output printform.

I will show one example. There are some Standard Sap Scripts such as MEDRUCK which is a standard Sap Script for Purchase Order and RVINVOICE01 for billing and so on...

To see oupt of MEDRUCK go to T-code ME9F give purchase order number and execute select one number and click on dislplay messages button on application tool bar you can find the print form of MEDRUCK.

You cannot change the Standard Sap Scripts but you can use Standard Sap Scripts and Copy them to userdefined Script and can make changes to them and replace standard Sap Script with usedefind script.

Ex: Go to SE71,

on menu bar u find Utilities->copy from Client. click on it u ll find new screen showing

Form name:

Source Clinet:

Target Form:

give Form name as usedefined form name EX: ZFORM1

Source client as 000 and

Target form as MEDRUCK.

execute.

Now, the standard from MEDRUCK is copyied to your form ZFORM1.

NOW, go to SE71 and give form name as ZFORM1 and do some changes to the form such as adding logo any thing. save and Activate.

Now, you have done changes to the Form ZFORM1 and u have to replace your form with standard SAP Script.

Go to NACE Transaction.

on Applications select EF for purchase order and click Output types button on application tool bar.

now select NEU as output types dobule click on Processing Routines.

now click on Change option on application tool bar and on right side u find MEDRUCK in form place replace MEDRUCK with ZFORM1 and SAVE.

go back twice and now go to T-code ME9F give the purchase order number and execute and select one option and click on display messges button .

you will find the changes that you have done in ZFORM1. so we cant chage the standard Sap Scripts by copying the Standard Sap Scripts we can chage and replace with our forms

Refer

https://forums.sdn.sap.com/click.jspa?searchID=4089895&messageID=3239299

Regards

Message was edited by:

Kiran Sure(skk)

Former Member
0 Kudos

Hi Kiran,

I need a help.I am trying to modify the standard script RVINVOICE01

for invoice generation according to my clients requirement.I copied the form to ZINVOICE AND did not make any changes to the driver program.I had to take the header and footer away as we have a pre printed header and footer available when we print the invoice output in a A4 paper.Now I had to make some changes in the allignment which i was able to do with a lot of struggle as I am new to scripts.The fields which were populating in the main window had most of the fields which my client gave.They are ITEM,MATERIAL,QTY,DESCRIPTION,PRICE AND VALUE.It also displays the BED,ECS,SECND HE,VAT TAXES and the calculations are perfect.The problem is that my client has given me two more fields which i need to populate in tha main window along with the rest,they are called JIT NO AND ASN NO (these fields are added to our tables as per our client req).These fields are added to the table VBRP and their fields are VBRP-JITCALLNO AND VBRP-ASNNO.Now I need to populate this data without changing the driver program.These new fields are related to the other fields which actually populate.Could please help me with a subroutine on how to populate these fields in the main window,where we get the invoice details.Let me know if you have any doubts on this,I will clarify for you.

Best Regards,

Karthik Sp

Former Member
0 Kudos

Hi,

you can debug in program SAPLSTXC include LSTXCFSCwith a breakpoint in istruction :

assign <sc_line>+sy-fdpos to >sc_line>

So you can modify the print string.

Regards

Raffaella