on 12-10-2010 5:05 AM
Hi,
I am printing a sap script layout when I save a purchase order (ME22N) .
I have created my own print program and i retrieve the purchase order details with BAPI_PO_GET_DETAILS.
I pass all the values to the Write_form. But None of the variables declared in teh program is Not identifiable in sap script.
I have confirgured the Print program , Form routine ans Sap script name in NACE.
What could be the reason?
An example line from the script:
Script:
INFO1: ( window name)
<S>Delivery Date</>&W_DELIVERYDT&
All the variable W_DELIVERYDT is not identifiable by sap script.
Its same in all windows and with all variables used
Print Program:
SELECT SINGLE eindt
FROM eket
INTO w_deliverydt
WHERE ebeln = ws_po_header1-po_number
AND ebelp = '00010'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = pl_element
function = 'SET'
type = 'BODY'
window = 'INFO1'
IMPORTING
Hi Santhosh,
Can you check if the code correction of this SAP Note resolves this problem:
1243485 - Unprinted variables and lines of a SAPscript form
Regards,
Aidan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Do not pass hard Coded values like '0010' instead pass the BAPI returned values - PO_HEADER_TEXTS-PO_NUMBER
PO_ITEMS-PO_IT..
and call those values in the Script and also Activate the Debuggger and see what values are coming into the Script.
and see that the strutures that you pass to BAPI are declared Global or not so that they are visible in Script
and try to use CONV * exists if it is something to do with internal and extranal formats..
surya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I checked. All variabes are global.
I had one clue.
I created a selection screen parameter and passed ebeln in s_ebeln and executed. Now the values/variables used in teh print program is identified by script and comming in output.
The thing is , If my print program is triggered from standard ME* transactions, my global variables in the print program are not recoginized by the script. Strange...
Actually For purchase order, there is standard MEDRUCK print program. I did not made copy of that since it is very huge wih spots, etc.
So I created my own Print program and used BAPI to retrive PO details ..and so on..
So what could bethe problem
Check the element names in the print program and also the script.
as you have created your own print program,you may be missing some element names..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I checked the element names, Its right.
When I execute in ME22N , no fields displayed.
But when I execute through ME9F , The ONLY standard structures used from the print program is printing in the script, like nast, ekko. Not not my global decalred fields.
&nast-objky(10)&
&EKKO-EBELN&
In ME22N, nothing gets printed including above two fields. Its strange
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.