on 02-25-2007 10:13 AM
hi experts
can u please help me how to add fields in sap scripts provide steps plz.
Hai Ahmed,
We can add new field to the existing sapscript by copying the form to the zform(like Medruck to zmedruck) and using the concept of subroutine pool.This subroutine pool takes the help of ITCSY structutre which has the fields name and value.Pass the value to the subroutine pool from the form with reference to which you want the new field.If you want mtart field in medruck you pass it as
/: PERFORM GET_MATERIAL IN PROGRAM ZSD_MATERIAL
/: USING &VBAP-EMATN&
/: CHANGING &P_MATNR&
/: ENDPERFORM.
Then you create a subrouting pool with name ZSD_MATERIAL and in that declare a form with name GET_MATERIAL and writre a select querry to get the mtart field from mara table with reference to EMATN field of VBAP.
Hope this will solve your problem.
Ramesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
to add a new field to the exising layout set you have to use subroutines and if you added a new window and have to out put some text on that from data base then copy the print program and the use write_form fm and pass text element to the write_form fm.
reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
we can add new field to sap script to meet the requirement of enduser. So we need to add the related text in form and then adding that field in the driver program.The data of the field should be retrieved from the database.
1.If we will add new field to SAP provided form like MEDRUCK then we we copy it to new form(Zf...)
2.Then we will add the text in the required place.
3.Then in the driver program we have to add that field .
If we have our own form then we can add through above steps.Here copy is not required.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi frnds..i also got this situation
but here we wrote the driver program and now i have to add extra field to script.But i dont have authorization to edit existing driver program.Without effecting drier program I want to add fiel to script.
Can anyone tell me how with syntax..
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In sapscripts if you want to add new fields you have to declare it in the print or driver program and use it in the sapscript as program symbols.
For example if you want to a field like vbeln is added inthe sapscript then declare it in the print program like
data wa_vbak like vbak-vbeln.
Then in the sapscript add &WA_VBAK-VBELN& in the Editor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
yes you're right. we can nver modify the standard print programs. however, you can copy the same in se38 with either z or y as the starting letter. After you've copied the print program such as SAPFM06P for Medruck to ZSAPFM06P, you can edit the program..i.e you can add ur own structure/fieldstring..and can use the same in printform's text editor as the program symbol.
I think this solves the issue.
thanks,
shamim.
Then we can easily modify !
but when i post the same query in past ,
some people have given me the concept of subroutine(perfom....itcsy...form..)
then y this concept? instead of this we can add directly using ur theory?
can u tellme with an example y this subroutine concept while talking abt adding fileds to scripts ?
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.