‎2008 Jan 02 6:56 AM
there are 2 smart froms beign read in a program, 1 is invoice, and another one is payment advice,
i have create another form using sap script. now i need to change the existing payment advice form into newly creeated one.
i'm npot sure how to change cause the program is abiot comlicated
can any one help me with this.
‎2008 Jan 02 7:41 AM
You can first copy the existing form to a new form and then make the modifications required in the new form.In this was you will be retaining your old form and can try out new form as well.
To copy the form you can follow this path.
SE71>Utilities>Copy from Client.
Here you can specify the source formname,destination form name and source client.
To make changes in this new form,go to SE71,enter form name and go to change mode and enter.
Click on button "windows".
You can also enalble Form-Painter by ticking te box at
Setting>For Painter>graphical form painter
To change the code of any window,juct double click on it and click Text-element(F9).
once done with changes,save the form and activate it.
To view this form in your output,go to t-code NACE.
Select the application where the Payment advice might be located and click on "Output types".
A new window opens,here selct the output type of payment advice form(the once that you select during Print output).
and click on "Processing Routines".
Here the form name of existing output is shown,you can replace rthe name with the new form name that you created now and save it.
Now when you run your transaction related to payment advice,you will be able to view new form.
In case you want to revert to old form,just do it in NACE and you are back to original one.
Reward Points if helpful,
Regards,
Bhavin P shah
‎2008 Jan 08 3:28 AM
hi there,
thanks for the reply,
but the current abap program get 2 smartforms,as 1 for printing invoice, another one is for tp print payment advice,
but now i have to replace the payment voucher with anohter payment voucher which develop using sap script,
when i check the coding, i dont understand where do the program gets the smart form,
i cant find the name of the smart form in the abap program,
is there any other way that a smart form can be linked to a abap program?
thank you.
‎2008 Jan 08 3:47 AM
Hi,
Hi ,
ABAP Program will create the FM (for calling smart form) Dynamically.
Check the below Fm in your ABAP program .You will find the code.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'SmartForm Name'
IMPORTING
fm_name = ws_form_fname.
It will return the FM (ws_form_fname) by using smartform
and calling that FM is like below.
CALL FUNCTION ws_form_fname
EXPORTING
control_parameters = device
TABLES
i_final_ap = i_final_ap.
Don't forget to reward if useful....
‎2008 Jan 08 6:18 AM
Hi Murali,
What you explained is correct but in case the ABAP program is a standard one,it does not show the formname in the call function may be because it reads the formname with the help of a variable.
You can check this standard program RLB_INVOICE for verification where the formnae is passed using a variable.
In suh cases how do we change the formname as asked by Mr.Vasantan.
Thanks,
Bhavin P Shah