on 09-24-2010 3:31 PM
Hi all,
I have a requirement to print all the condition types item wise in a purchase order.I am passing all the condiion type in a standard text created in so10 through subroutine pool SAVE_TEXT FM and calling that in form using INCLUDE command.My problem is in 1st line item all the condition type printing
ok ,but in 2nd item onward same thing is getting repeted, even i am calling the subroutine prg item wise and changing the textline
using SAVE_TEXT.
With Regards,
Abhaya
Hi Abhay ,
My suggestion is, don't use standard text to print the line items, it will be a performence issue.any one can open the standard text and modify the data .so copy the standard program one and modify the code according to your requirement.
Thanks and regards
Naresh bammidi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am facing exactly the same problem and i dont have much knowledge of scripts. Please advise anyone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I thought (in the standard print program/SAPScript MEDRUCK) there's already a list of conditions passed to the SAPScript and these are output using a particular element in the MAIN window. Is there any reason you can't use that? If it's because you tried this already but some of the conditions aren't being output, that may be because the conditions aren't flagged for printing in the pricing procedure/condition type - there's definitely a config. flag which indicates whether a condition should be printed or not.
Regards, Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andy,
Yes I am using the standard driver program of purchase order, only form is copied.
I an changing only the form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you should be freeing the internal table I_TEXT after the FM SAVE_TEXT is called. There is a chance that the old value is still being retained in the internal table for subsequent iterations in the loop .
And also you dont have to call SAVE_TEXT every time to create a text and then call it in your SAPScript. You can directly use the header information from the item level text of purchase order and call it in the script using INCLUDE statement.
Please let me know if you need any more clarifications
Hi,
Are you using the standard SAP print program for a PO (please specify the print program name) or is it a custom version?
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andy,
I have created a standard text in so10 ie ZTEST11
/E ITEM_LINE_1
IL
/ &EKPO-EBELP&,,&EKPO-EMATN&,,&EKPO-TXZ01&
/: PERFORM F_TEST IN PROGRAM ZTEST11
/: USING &EKPO-EBELN&
/: CHANGING &WS_TEST&
/: ENDPERFORM
/: INCLUDE ZTEST11 OBJECT TEXT ID ST LANGUAGE EN
This is the code in sap script.
w_header-tdobject = 'TEXT'.
Standard text name
w_header-tdname = 'ZTEST11'.
Text id
w_header-tdid = 'ST'.
Language
w_header-tdspras = 'E'.
w_text-tdformat = '*' .
w_text-tdline = 'ABC' .
append w_text to i_text .
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = w_header
insert = 'X'
savemode_direct = 'X'
TABLES
lines = i_text
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5
.
IF sy-subrc <> 0.
ENDIF.
This is the code in subroutine pool program
Itemwise i am changing w_text-tdline value from ABC to XYZ but while printing it still print ABC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Your text is saved at line item level? And you're changing the line item number and passing it as part of the text name field when using the INCLUDE in the SAPScript?
Regards, Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.