on 08-01-2007 2:25 PM
HI FRIENDS..
in sapscript..
from driver program i send 10 material no from mara table to layout(se71 script)..
my requirement is
in layout based on the material no i have to select material description from makt using perform statement
how can i do this
please its urgentt
Hi,
Hope you're doing well!
I think here in this case there is no need of creating a separate subroutine using PERFORM statement on the layout. For getting the Material description from MAKT table...you can create an internal table of two fields..matnr and maktx.
Loop at the internl table for MARA...n get all the materials in your new created internal table...then you can get the material description from MAKT table using the following piece of code:
IF t_makt[] is not initial.
Select maktx from makt into correspoding fields of your new create internal table
for all entries in t_mara
where matnr = t_mara-matnr.
This will give you the material description of all the materials and that too you will hav these in one internal table..
Now..on the layout..you can use your newly created internal table as:
&your newly created internal table-maktx&
If this does not resolve your issue..then let me know i'll you another approach..
Please provide me points if this sounds helpful.
Thanks,
Shamim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
that means ..you're going to hardcode the company codes on the layout...if yes..then you can use case endcase statement and inside each company code..you can display the material description for the material.
Here is an example of using Perform statement on the layout and its subroutine in the print program or separte program:
SCRIPT
/: &TEXT& = ' '
/: PERFORM MATERIAL_DISCRIPTION IN PROGRAM ZZSDS004
/: USING &VBDPL-MATNR&
/: USING &VBDKL-VKORG&
/: USING &VBDPL-VTWEG&
/: CHANGING &TEXT&
/: ENDPERFORM
SUBROUTINE DEFINITION
get material number
READ TABLE in_par INDEX 1.
CHECK sy-subrc = 0.
l_f_matnr = in_par-value.
get sales organization
READ TABLE in_par INDEX 2.
CHECK sy-subrc = 0.
l_f_vkorg = in_par-value.
get distribution channel
READ TABLE in_par INDEX 3.
CHECK sy-subrc = 0.
l_f_vtweg = in_par-value.
Thanks,
Shamim
also check this web page for using PERFORM statement without making changes in the standard program:
http://help.sap.com/saphelp_47x200/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
Thanks,
Shamim
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.