Header text in purchase order
created text in so10 with name dms_inst
while creating po with header text, i will enter in text editor with the name dms_inst
when saving the the so10 text should be save in headet text.
using the badi ME_PROCESS_PO_CUST.
in the pst metthod used the code below
DATA : lv_mepoheader TYPE mepoheader,
lv_texttypes TYPE mmpur_t_texttypes,
lv_text TYPE mmpur_texttypes,
wa_text LIKE LINE OF lv_texttypes,
v_tdname TYPE tdname,
lv_bool TYPE mmpur_bool,
i_textlines TYPE mmpur_t_textlines ,
v_stxh TYPE stxh,
i_tdline TYPE TABLE OF tline,
w_tdline LIKE LINE OF i_tdline,
v_tabix TYPE numc2,
w_line LIKE LINE OF i_textlines.
break gullapsu_zen.
CALL METHOD im_header->get_data
RECEIVING
re_data = lv_mepoheader.
CALL METHOD im_header->if_longtexts_mm~edit_text
EXPORTING
im_tdid = w_line-tdid.
CALL METHOD im_header->if_longtexts_mm~get_types
IMPORTING
ex_texttypes = lv_texttypes.
LOOP AT lv_texttypes INTO wa_text.
REFRESH i_textlines.
MOVE sy-tabix TO v_tabix.
MOVE wa_text-tdid TO w_line-tdid.
MOVE wa_text-tdobject TO w_line-tdobject.
MOVE wa_text-tdid TO lv_text-tdid.
MOVE wa_text-tdobject TO lv_text-tdobject.
MOVE 'X' TO lv_text-textflag.
CALL METHOD im_header->if_longtexts_mm~get_text
EXPORTING
im_tdid = wa_text-tdid
im_texttype = lv_text
IMPORTING
ex_textlines = i_textlines
ex_text_formatted = lv_bool.
LOOP AT i_textlines INTO w_line WHERE tdline NE space.
CONDENSE w_line-tdline.
MOVE w_line-tdline TO v_tdname .
EXIT.
ENDLOOP.
SELECT SINGLE * FROM stxh INTO v_stxh WHERE tdobject = 'TEXT'
AND tdname = v_tdname .
IF sy-subrc IS INITIAL.
REFRESH i_textlines.
CLEAR : w_line .
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = v_stxh-tdid
language = sy-langu
name = v_stxh-tdname
object = v_stxh-tdobject
TABLES
lines = i_tdline
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT i_tdline INTO w_tdline.
MOVE w_tdline-tdformat TO w_line-tdformat.
MOVE w_tdline-tdline TO w_line-tdline.
APPEND w_line TO i_textlines.
ENDLOOP.
CALL METHOD im_header->if_longtexts_mm~set_text
EXPORTING
im_tdid = wa_text-tdid
im_textlines = i_textlines.
*data: val type MMPUR_BOOL value ' '.
*CALL METHOD im_header->IS_CHANGEABLE
receiving
RE_CHANGEABLE = VAL.
*CALL METHOD im_header->SET_CHANGED.
CLEAR : v_stxh , wa_text,w_tdline.
ENDIF.
ENDLOOP.
its dispaying the so10 text in po and getting message po saved with that text.
in change mode i am not able to see the text its dispaying the eralier so10 text dom_inst which i gave
let me know whats wrong
Hi
The fm READ_TEXT return whole text in TLINE structure, this one has two field:
- The first field indicates the paragraph or command used;
- the second one returns the text.
Now the field with text is long 72, so if the text is longer than 72 char, it'll be splitted in more lines than one.
In this case you should find the simbols indicating the line belong to the same paragraph of the previous line.
These symbols are usually SPACE or =, so if the hits in TLINE are like above:
Bye! Bye! The first line starts here
= and finsihs here
This is the next line.
It means you have a text with two lines:
Bye! Bye! The first line starts here and finsihs here
This is the next line
Max
Similar Messages
-
Default Header text in Purchase Order
Dear All,
I want to have a default PO header text.I.e whenever I create a PO the header text say "This PO is for XYX" should come as default in Header Text. How this can be achived.Through Config OR using some Function module..
what are the config.steps.?
Thanks in advance .
Regards
AmarTry below steps this may help you
Adopt Purchase Order Header Text
To default the Header Text into the Purchase Order
Step 1 :- Maintain text in Vendor Master
MK02 - Change Vendor
Choose Extras -> Texts - Input the text in Purchasing memo
Step 2 :- Link Text types to Header text in Purchase Order
OMFV - Define rules for copying (adoption of) text
Choose Header Text
Choose Goto -> Linkage: text types -> To vendor
Filled in the field No. (e.g. 01 - Header Text), next tick whether you want the text to be adopted or for displayed only
Choose Update to save -
HEADER TEXT in purchase orders using BAPI_PO_CREATE
How to update HEADER TEXT in purchase orders using BAPI_PO_CREATE or BAPI_PO_CREATE1?Please advice for both types.
Hi Srini ,
IF you are using the BAPI_PO_CREATE , we are not having the parameter to pass Header Text.
If you want to get Header Text directly then Use BAPI_PO_CREATE1 wiht a parameter POTEXTHEADER (I am not sure it is there in 4.7).
If BAPI_PO_CREATE1 does not exist in 4.7 then use create_text function module to update the the Header text
Hope it helps
Rgds
Sree M
Edited by: Sree Merugu on Jun 13, 2008 5:10 PM -
How we will maintian Header Text in Purchase Order Mandatory?
Dear All,
How we will maintian Header Text in Purchase Order Mandatory?Please suggest a Solution..
Thanks,
Rajuhi
in standard it is not posible u need to use User exit: EXIT_SAPMM06E_012 of enhancement MM06E005. check details with ABAPer
Vishal... -
Copying Purchase requisition header text to Purchase order.
Hi Experts,
Can you suggest me a way to copy purchase requisition header text to purchase order?
Best Regards,
ShailendraHi
PR header text cannot be copied to PO ....... its std SAP .... reason being many PR can be copied to same PO .... so how to decide which PR header text to be copied to the PO .... ??? -
BADI/Userexit for header text in Purchase order
Hi Experts,
i had a scenario , in that when i create a sales order , a purhcase requisiona and purchase order will also generate automatically.
in this case how to copy the header text of sales order to PR and PO.
is there any BADI or User Exit for this..
Pls help me.
Thanks ,
ChandraHello Chandra
Assuming that you are working on ERP 6.0 (Do we know???) then the BAdIs are:
ME_PROCESS_REQ_CUST
ME_PROCESS_PO_CUST
Regards
Uwe -
Default header texts in purchase order
Hi,
I would like to ask you for help in following case.
I need to set default purchase header text when a new PO is created in me21n.
I found transaction VOTX where can be this done for sales order, but not for PO. Is there anything similar also in MM?
Maybe I could use user exits in MM06E005, but I didn't find the relevant structure which keeps header texts.
Third idea is to add header text fields into personal setting in me21n, where each user can define his own default texts but I have no idea how to do that.
I need to set default texts which are global for all purchase orders, so it has no sense to use Info record in this case.
Has anybody experience with this? I would appreciate any help. Thanks.Hi,
you can try to solve it using BADI ME_PROCESS_PO_CUST. The method open is suitable for you problem. Here is a quote from a BADI documentation.
The OPEN method enables you to do the following when opening a new
document:
o Import new data if the document was already posted to the database
o Initialize your own data when creating a new document
You get a reference for object with type IF_PURCHASE_ORDER_MM in this method. This class implements interface IF_LONGTEXTS_MM with methods like IF_LONGTEXTS_MMGET_TEXT and IF_LONGTEXTS_MMSET_TEXT. So you should be able to set long text for your new PO in this method. Check BADI documentation for more info.
Cheers -
Unlimited space in Header Text of Purchase Order
Hi
Our customer wants to have unlimited space in the Header Text of the Purchase Order. Standard SAP Purchase order header text allows 15000 lines to be entered (approx 150 pages). After which the text needs to be split and entered. The same was suggested to the customer, but he wants to have unlimited space to enter in the Header Text and the same to be printed in the purchase order.
Can any one suggest a solution for the same.
Thanks in advance.
AJHi all,
Thanks for your quick response. The customer has got his own sets of terms and conditions which he wants to enter in the purchase order and take it in the printout of the purchase order. The data of these terms and conditions goes to more than the standard limit in SAP. Please help with a solution for the same.
Thanks in advance.
AJ -
Header text in Purchase order is diappearing
hi,
while creating a purchase order i am entering the header text for shipping instructions, the movement i save the order the text is gettign disappeared , can any one help me to resolve this, any kind of help will be highly usefull..Is the the header text id a custom or SAP standard? If its custom, then there is some problem in the customizing or the TEXT-ID/Object creation.
-
Printing Header Text in Purchase Order
HI,
Actually I had the problem. A smart form has been developed for printing Purchase Order. Here in smartform a field has been declared to accept whatever the text had keyin in Header Text has to appear in Purchase Order. It is printing correctly until it is of Two paragraphs which consists of two or max three lines. Whenever it is exceeding these two paragraphs even a single word. It is printing something from the middle and in a reverse way. To get the clear picture I will give the example below.
<b>Ex.</b> <b>I</b>) This Purchase Order has been given.
Delivery has to be make on time.
In the above example it is ok printing properly.
<b>Ex.</b> <b>II</b>) This Purchase Order has been given after
verification.
Delivery has to be make on time as scheduled.
On Delay PO will be cancelled.
In this IInd example the output is showing as
<b>Output:</b> to be make on time as scheduled.
verification.
This Purchase Order has been given after
On Delay PO will be cancelled
Delivery has
Waiting for your help.
Thanks in Advance.
bye
Abdul Mannanhi,
Ofcourse, the field is a part of main window in Smart Forms. I will elaborate further, In Main window we declared one <u><b>Table</b></u> in the Tables <u><b>Main Area</b></u> there is a <u><b>Row</b></u> and in a Row there is a <u><b>Cell</b></u> in a cell we declared one <u><b>Text Field</b></u> which is taking that <u><b>header text</b></u> and printing it as output.
I hope you got it.
Waiting for reply with a good solution.
Thanks and Regards.
Bye.
Abdul Mannan -
Copy Purchase Requisition Header Text to Purchase Order
Hello!
I will like to copy the Header text of the Purchase Requisition to the Purchase Order.
I have read that SAP does not allow to copy it to the Header Text of the PO but it allow to copy it to the Item text of the PO.
Can you give some hint on how to do this.
Thanks.
Regards,Hi
You can't copy the header text of PR to PO header
because Sometimes you need to convert different PRs to one PO.So each PR will have different header text, how the system will identify in PO header text.
So whatever the item text you maintained for PR will be copied to item text of PO if you create the PO with respect to PR.
So for this reason SAP has not provided the option for link the PR header text to PO header text.
Hope you understand,
rgds
Chidanand -
Write header text in purchase order
hello,
I read text from a purchase order with FM READ_TEXT. But, How can i write or change this text?
ThanksHi
Use SAVE_TEXT FM to Save the text.
Thanks
Ravi -
To change the header text of Purchase order using BAPI
Hi,
I am using BAPI_PO_CHANGE to change the header text of PO. But it s not reflecting. Can anyone help me by providing solution for this.
<i><b>Points will be rewarded for the useful answers.</b></i>Hi,
I need to change the text using this BAPI alone. I am using this because i need to change many parameters of PO.
Can u please say me solution using BAPI_PO_CHANGE. I need to know what are all the parameters need to be passed to BAPI to change the text.
Thank you for replying. -
Reg. Validation on Header text in Purchase Order Transaction
Hi All,
As per the requirement we need to validate on header text in PO transaction.
Can any one let me know if there is way to do using user exit or configuration.
Please kindly help me. This is urgent.
Regards
Anil Kumar KHi
You can check either user exit or BADI implementations.
I´d recommend implementing BADI ME_PROCESS_PO_CUST on the method PROCESS_HEADER.
Dont forget to reward if helpful.
Bye
Gabriel P. -
How 2 Copy Header & Line Item Text from Purchase Order 2 Out Bound Delivery
Hi SD Gurus,
I want to copy header and line item text from Purchase Order to Out Bound Delivery (This is required in Stock Transfer Process).
I have been able to do successful config. for copying header and line item text from Sales Order to Outbound Delivery but config. doesn't seems to be same for copying text from PO to OBD.
Is there any way to achieve the same? Can some expert show the way to achieve this.
Thanks in advance.
Warm regards,
Rahul MishraHi Ravikumar thanks for u quick reply.
This is wht is currently coded.
concatenate values to get item text for read text function
invar3+0(10) = invar1. "PO number
invar3+10(5) = invar2. "PO line number
SELECT SINGLE * FROM stxh WHERE tdobject = 'EKPO'
AND tdname = invar3
AND tdid = 'F01'
AND tdspras = sy-langu.
IF sy-subrc = 0.
invar4 = invar3.
reading the text for the document items.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'F01'
language = sy-langu
name = invar4
object = 'EKPO'
TABLES
lines = it_itab.
I have seen some PO's which have info rec texts in that, which gets pulled by the above code...first thing is its id is F02 which exist in STXH table also there is other text with F01 id, and hence the table it_itab gets both these text hence no pbm.
but i came across a PO which has only one text which is info rec text with id F05 and is not store in stxh and hence doesnot get pulled by read_text fm. How do i change my cod to get this text which should not hamper other PO's as well.
As mentioned in above msgs, this F05 could be retrieved by providing object name as EINE.
anyhelp will be appreciated and rewarded.
thanks
Maybe you are looking for
-
Playing Music in iTunes Not Working
I can select a song to be played and when the end of the song is reached it simply stops playing music. If I hit 'next' the current song being played pauses. I have shuffle on. Any ideas out there on how to fix this??
-
I have the new Snow Leopard system on my iMac. I saved several images from an art site. The file extension on each image is "htm". when I try to open each image all I get is gibberish tpye text. Can convert these "images" to jpeg files so I can view
-
Two simultaneous sound outputs by using external USB sound card
Hi I have a MacBook Pro running Mac OS X 10.4.1 I've also bought a Griffin iMic as my second sound card. Mac OS X shows my internal sound card as well as the external USB one and I can easily switch between them. I was wondering if there is a way of
-
No SID -Database visible under Operations: System Monitoring
Hi! I successfully set up the System Monitoring for one satellite system with SAP DB. I integrated DB via tcode SM59 and created the alert monitor. After this I created the User Defined alerts in System Monitoring Setup. The prooblem now is I cannot
-
Built in iSight to view from IP address
I want to Stream from my built in iSight to view from IP address from my phone anytime while I am gone does anyone know how I could do that?? I have a iMac (24-inch, Early 2008) 4 GB 800 MHz DDR2 SDRAM 3.06 GHz Intel Core 2 Duo OSX Yosemite Version 1