on 01-15-2009 4:34 AM
Hi everybody,
I have the task like the following :
In a PO there are text folders available at Header and Item level. I want POs with type Purchasing document type u2018ZFu2019 ( First Article PO ) should display all the texts entered into any of these folders either at Header level or Item level during print preview and PO output like Purchasing document type u2018NBu2019 ( Standard PO ).
u2022 The technical information relating above subject ( SAPScript 😞
o The layout set ( form 😞 ZPCC_PURCHOR_STD
o Print program : SAPLMEDRUCK
u2022 The problems like the following :
o I found out the differences in debugging of 2 types of Purchasing document type u2018ZFu2019 and u2018NBu2019 .
o Only Purchasing document type u2018NBu2019 the print program processes Text Elements (HEADER_TEXT, ITEM_TEXT, SUPPL_TEXT) to display all the texts entered into any of these folders either at Header level or Item level.
o To control the displaying of Text Elements as I know I need a print program, however, our print program is standard print program of SAP system in this case. So I can not make any changes there.
Do we have the configuration place to this one.
Please help me to fix the problem. Thank you in advance !
Hi
I advise to use the subroutine pool as your sapscript is the bespoke one ( Z one) . So you can make use of the below pseudo code.
In the sapscript the point where you want to display the text include the following code (
Assume that your are print header text Then first find out the Co-ordinates for it .Go to me23n->Text tab-> In change mode -> double click on text editor-> which takes you to sapscript layout->Under Go to -> Click on header & get the following details.
Text name : ekko-ebeln
Language : ekk-spras
TEXT ID : F01
TEXT OBJECT : EKKO.
/: DEFINE &V_ID& = 'F01'
/: DEFINE &V_OBJECT& = 'EKKO'.
/: DEFINE &V_LINE1&
/: DEFINE &V_LINE2&
/: DEFINE &V_LINE&
/: PERFORM GET_HEDER TEXT in program Z_PURCHASE_TEXT
/: USING &EKKO-EBELN&
/: USING &EKKP-SPRAS&
/: USING &V_ID&
/: USING &V_OBJECT&
/: CHANGING &V_LINE1&
/: CHANGING &V_LINE2&
/: CHANGING &V_LINE3&
/: ENDPERFORM
&V_LINE1&
&V_LINE2&
&V_LINE3&
Now in the Subroutine pool Z_PURCHASE_TEXT
FORM GET_HEADER_TEXT USING IT_INPUT STRUCTURE ITCSY
CHANGING IT_OUTPUT STRUCTURE ITCSY.
LOOP AT IT_INPUT.
CASE IT_INPUT-NAME.
WHEN 'EKKO-EBELN'.
V_TEXTNM = IT_INPUT-VALUE.
WHEN 'EKKO-SPRAS'.
V_LANG = IT_INPUT-VALUE.
WHEN 'V_ID'
V_ID = IT_INPUT-VALUE.
WHEN 'V_OBJECT'.
V_OBJECT = IT_INPUT-VALUE.
ENDLOOP.
USE FUNCTION MODULE READ_TEXT BY USING ABOVE PARAMETERS AND READ THE TEXT AND FILL THE VALUE IN FIELDS IT_OUTPUT.AS BELOW.
BEFORE THAT FILL V_LINE1,2,3 AFTER GETTING A TEXT FROM READ_TEXT FUNCTION MODULE.
LOOP AT IT_OUTPUT.
CASE IT_OUTPUT-NAME.
WHEN 'V_LINE1'.
IT_OUTPUT-VALUE = V_LINE1.
WHEN 'V_LINE2'.
IT_OUTPUT-VALUE = V_LINE2.
WHEN 'V_LINE3'
IT_OUTPUT-VALUE = V_LINE2.
ENDLOOP.
ENDFORM.
Declare the valriable in the routine v_textnm,v_lang,.....
I hope this hint help you to resolve your issue. Note : the spelling of commands which i have wrote may be incorrect.
Cheers
Joginder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
Copy your standard program, and then do changes according to your requirements.
then assign new program created by u in NACE.
regards,
KP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.