on 04-13-2009 10:57 AM
Hi Gurus,
I am working on PO Script (MEDRUCK). I copied the Standard to a Z form. ZMM_MEDRUCK, Now I need to print the the Header text at the end of MAIN window. I created a a perform and call it from the Script and read the heder text by using FM Read_text
DEFINE &TEXT1& = ' '
PERFORM GET_TERMS IN PROGRAM ZMM_MEDRUCK_ROUTINE
USING &EKKO-EBELN&
CHANGING &TEXT1&
ENDPERFORM
PROTECT
&TEXT1&
ENDPROTECT
but while returning I am getting only one line. Can any body suggest me how I can read the Header text in PO script. Please provide the sample Code.
Regards
Sony
Just use the include command for header texts, there's no need to read the text first, just pass the same info to the INCLUDE as you would the READ_TEXT (tdname, tdobject, tdid).
/: INCLUDE &EKKO-EBELN& OBJECT EKKO ID F01
would print the Header text for the PO = EKKO_EBELN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use INCLUDE TEXT Control command in the main window if the text.
/: INCLUDE <TEXT-NAME> OBJECT <OBJ> ID <id>.
Generally the purchase order header texts are saved using the PO number.
Please check the table 'STXH' to know the name of the text , Object and ID.
Regards,
Jagadeesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this Function module 'READ_TEXT'
T_lines contains the header text, you can loop it and display it in sap script
Function module to read the header text
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'F01'
language = sy-langu
name = ekko-ebeln
object = ekko
TABLES
lines = t_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
Regards
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In Script Just use:
/: INCLUDE ZPO_TERMS_AND_CONDITIONS OBJECT TEXT ID ST LANGUAGE EN
where ZPO_TERMS_AND_CONDITIONS is the header text to be 'included' in the sap script.
Regards
Raju chitale
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
after gettting the HEADER Text from FM 'READ_TEXT' into a table, U loop the Text lines table and call FM WRITE_FORM in the LOOP.
since we are loop the Text lines table it will display all the lines available in Header text of PO...
eg:
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = zvid
language = 'R'
name = zvname
object = 'VBBK'
IMPORTING
header = thead
TABLES
lines = line
EXCEPTIONS
OTHERS = 8.
LOOP AT line.
call function 'WRITE_FORM'
exporting
element = v1
window = 'HEADER'.
endloop.
Hope it helps!!
Regards,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Pavan. I am using the element Last. So In Routine I coded like
loop at t_lines
call function 'WRITE_FORM'
exporting
element = 'LAST'
window = 'MAIN'.
endloop.
Can you please suggest me what i have to write in Element LAST in Script ??? Pls provide code.
I have written like the following in Script.
LAST
DEFINE &TEXT1& = ' '
PERFORM GET_TERMS IN PROGRAM ZMM_MEDRUCK_ROUTINE
USING &EKKO-EBELN&
CHANGING &TEXT1&
ENDPERFORM
User | Count |
---|---|
85 | |
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.