on 01-21-2007 6:45 AM
Guys,
as i am new to ABAP
i am struggling with the modification of the standard SAPSCRIPT MEDRUCK or assigning my own SAPSCRIPT in NACE to the PO output types.
i have seen your forum and acted accordingly
here are some problems that i am facing
please help ppl
<b>----
assigning my own SAPSCRIPT
-
1. it is showing OPEN FORM error for document 'so and so' on having the print preview.
-
copying the MEDRUCK SAPSCRIPT and Modifying
-
i would like to tell you that when i copied MEDRUCK SAPSCRIPT into a ZMEDRUCK, i am not able to add, delete any new elements there. i can edit or modify those which are reviously there but adding new window or repositioning the old windows is not possible
1. while copying the program SAPFM06P the language is german, how to change that as language option is not there
2. i also copied the include FM06PE02, now on saving its asking for a ENHANCEMENT POINT
3. i copied the Function Group MEDRUCK and function modules ME_READ_PO_FOR_PRINTING and ME_PRINT_PO but I am not able to find the place where i have to mention the new SAPSCRIPT name so that it would work.wher woul i'll get OPEN_FORM, WRITE_FORM, where i'll get to give my SAPSCRIPT name
4. is it sufficient to change the name of the SAPSCRIPT in the NACE output types FORM or we have to change this name internally also if we are changing our own created SAPSCRIPT
5. right now a field is displaying a material number, i have the req. of taking its description from a structure on a specific condition and display it there, this coding will be done at which place, function gruop or SAPSCRIPT.
i have to do certain format changes that is
REPOSITIONING of ADDRESS and other windows
upload the logo
and some field display modification
for this what you will advice
1. copy of MEDRUCK and modifying ... because if i am copying it into ZMEDRUCK and placing it in NACE it is working without CHANGING the program and function group... but all my motives are not done as i told u its optionless of new windows and repostioning option
2. if i am making a new script then i am clueless what all thing to be changed and the trubles i mentioned above</b>
please guide ppl
i need it urgently
<i>always follow ur heart</i>
<b>Upadhyaya Nitin</b>
Hi Nitin,
Download your modified script & using program RSTXSCRP. And delete the modified script from SAP in German as well as in English language. And also delete the change request created for script from SE09. Then upload the downloaded script using same program RSTXSCRP.
If you have not done major changes in modified script then download the MEDRUCK & upload it into Zscript & then modify it.
After this you will be able to add the new windows in zscript.
You are getting error of open form because you may not hve changes the script name in print program from standard script to zscript.
For modifing the standard print program you also need to copy it into zprogram & asign this zprogram also to NACE transaction.
Ashven
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you Ashven for your response ...
as i mentioned in my question
the modification of the print program is the problem
<b>where in the program i have to give the new SAPSCRIPT name
i gave it in the NACE transaction, will it not take it directly from there
if we copy it from standard FORM then it takes it from there directly
now i have 3 things
guide me which will be edited
1. Standard Print Program
2. NEU Form
3. Standard Function Grup MEDRUCK which has two Func. Mod.</b>
<u><i>please if you have some sample cod e
or please guide the exact point to be edited for giving the SAPSCRIPT name</i></u>
Hi Nitin,
1) There is other method to editing script if you are not able to change the script. Do the following. Go to SE71. Provide the Copied Script name & language DE go for Change. Now go for Utilities ->Convert Original Language. Here give To original language as EN. Now go for F3. Now provide the script name & language as EN. Go for change. This time you will be able to modify the script.
2) There is no need of providing form name in Print Program. Copy the Standard Print program name in Zprogram name. & assign it in Nace Transaction.
Ashven
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for bothering you Sir
but it is very very urgent
right now a field is displaying a material number, i have the req. of taking its description from a structure on a specific condition and display it there, this coding will be done at which place, function group or SAPSCRIPT.
that is ...
a material description field is showing a code for a particular material type ... ok
this code has a description in some structure field...
for that particular material only instead of that code i have to display the corresponding text description
right now the code written is MAIN WINDOW is
&ULINE(71)&
S.No Item Description Qty. U/M Rate Amount (Rs.)
&ULINE(71)&
ITEM_LINE_1
&EKPO-EBELP& &EKPO-TXZ01& &RM06I-LTEX1&
ITEM_LINE_3F
&RM06P-PRMG1& &*T006A-MSEHT&
-
Sum total for item
-
TOTAL_AMOUNT_ITEMS
PROTECT
Total net item value&EKKO-WAERS& &KOMK-SUPOS&
ENDPROTECT
TOTAL_AMOUNT
PROTECT
&ULINE(71)&
Total (Excl. Taxes)&KOMK-FKWRT&
IF &SUM-EURO-PRICE& NE ' 0,00'
IF &SUM-EURO-PRICE& NE ' 0.00'
EURO &SUM-EURO-PRICE&
ENDIF
ENDIF
ENDPROTECT
-- Document conditions -
ITEM_CONDITIONS
PROTECT
Taxes : &KOMVD-KWERT&
ENDPROTECT
ITEM_CONDITIONS_UNIT
&KOMVD-KBETR&&KOMVD-KWERT&
it is just that i have tried to manupulate the output
its not a proper coding i know
but please help
the requirements are
the data is not coming in one line
u can see that the details (S.No., Item Description, QTy, U/M, Rate, Amount ) about the single material is displayed in three lines.
the Item Description is showing a Code APF401,
for a particular material type (field not in PO) it will fetch value from a structure's field and display
otherwise it will be ok
this code where i will write???
1. does the coding in the SAPSCRIPT has to do something with the Program ?
2. what does different color band s in the SAPSCRIPT coding means ?
have you got some study material for SAPSCRIPTS for coding
guide me in something related to standard SAPSCRIPT modifications
it will be very helpful na dgrateful of you Sir
always follow ur heart...
Upadhyaya Nitin
Hi Nitin,
You add this code in your print program.
Soppose you are getting field description from a structure & it is already filled in print program then you no need to write any code. Just pass &structure-fieldname& in script.
I have checked MEDRUCK form there is field called &EKPO-TXZ01& already passed in script. And it a material description field. If you want to add this field to your customized script then no need of writing any code. just write field name like this &EKPO-TXZ01& in script.
If above mentioned field is not which you are looking for then go to print program name & go for EDIT->Find/Replace. Here provide OPEN_FORM. you need to write the code for before this function module.
In Script we cannot write code.
Is the above information is useful for you?
Ashven.
thanks Ashven for taking so much truble for me
ya you are right the field &EKPO-TXZ01& is for MATERIAL DESCRIPTION
and that has to be displayed and it is working fine
... my question is not that Sir,
see it is the material description field,
but for one type of material suppose RAW MATERIAL, this material description is not to be taken from &EKPO-TXZ01& (the usual) instead it is to be taken from a structure &RM06I-LTEX1&...
when i am giving this field it is not showing anything (blank)
how to access this structure field ?
for this i have to modify the program ?
where in the program i will get to provide access to the field in the script ?
Hi Nitin,
I have checked the print prog as it does not have the structure you have mentioned.
you can do one of the following thing:
1) Check the class CL_PURCHASE_DOC_OUTPUT in this all the tables are passed for PO details in Print program SAPFM06P. In this you need to search the exact table & field name because the field you mentioned is from structure not from table. If that table is already passed to print program then use only the field. otherwise write a select query after functionm module "call function ls_function" in Include program FM06PE04.
2) you need to write code in your script:
For this you need to write PERFORM in your sapscript passing the values to the FORM in a "Z" program and doing the calculation and passing the value back to the form. Since you are working with a standard print program, you can not put this FORM in your driver program, all you need to do is create a "Z" program and put this FORM in it, and then reference the "Z" program in the PERFORM statement in your sapscript.
For more details visit this link for adding Subroutines to Script:
And also search in SDN for more details for adding code in script as I never get a chance to do this.
Hope this will solve you problem.
Ashven
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.