Using function 'read_text' to get the Material PO Text in Purchase Order
Hello,
i am using this function READ_TEXT to get the Material PO Text of a PO.
concatenate ekko-ebeln ekpo-EBELP into txt.
CALL FUNCTION 'READ_TEXT' " FM Read_text
EXPORTING
ID = 'F03'
LANGUAGE = 'E'
NAME = txt
OBJECT = 'EKPO'
TABLES
LINES = itab
EXCEPTIONS
ID = 1.
Now if i enter the Mat PO Text, the function works fine. But if i dont enter the Mat PO Text, the prog gives a dialog box error at compilation that ,
<b>Text 450000001800010 ID F03 language EN not found</b>, where '450000001800010' is the value of 'txt'(passed to the function).
how to check for invalid text name returning from the function ????
Thanks for yur time.
hi
use the select query from STXH to c if the text exists and pass the same value as what u r doing to read_text and if the sy-subrc = 0...then only use the FM ...hope it helps..
reward points if it help...
regards
Gunjan
Similar Messages
-
How to download material sales text and purchase order text information
Here is situation:
goto MM03 transaction,
Take any material -- and select below views
1. sales text
2. purchase order text
i have to write the download program with the sales text and purchasing text information of all the materials.
could you pls tell me in which table I will get all the above sales text and purchase order text infrmation.
I think it will store in standard text. I checked STXH table also for getting information text object, text id, text name, language, etc.
If anybody knows .. please share.
Thanks in advance.
Regards
RaghuDeclare internal tables as follows: - An example
TYPES: BEGIN OF TY_PO_LINES,
INCLUDE STRUCTURE TLINE.
END OF TY_PO_LINES,
TY_PO_LINES_T TYPE STANDARD TABLE OF TY_PO_LINES.
TYPES: BEGIN OF TY_PO_TEXT,
TDOBJECT TYPE TDOBJECT
TDNAME TYPE TDOBNAME,
TDID TYPE TDID,
SPRAS TYPE SPRAS,
TDLINES TYPE TY_PO_LINES OCCURS 0,
END OF TY_PO_TEXT,
PO_TEXT_T TYPE STANDARD TABLE OF TY_PO_TEXT.
DATA: PO_TEXT TYPE TY_PO_TEXT_T
PO text:
Looping at your internal table which consists of PO number,
SELECT TDID TDSPRAS FROM STXH INTO A INTERNAL TABLE say PO_TEXT
TDOBJECT = EKKO "PO Header Text
TDNAME = PO NUMBER
SELECT TDID TDSPRAS FROM STXH INTO A INTERNAL TABLE say PO_TEXT
TDOBJECT = EKPO "PO line item text
TDNAME = PO NUMBER
ENDLOOP
Looping at PO_TEXT
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = PO_TEXT-TDID
LANGUAGE = PO_TEXT-TDSPRAS
NAME = PO_TEXT-TDNAME
OBJECT = PO_TEXT-TDOBJECT
TABLES
LINES = PO_TEXT-TDLINES
ENDLOOP
Follow the same above logic for material with suitable TDID you need to extract
Hope this helps,
SKJ -
How to get the Ship-To text for an Order from R/3 to CRM?
Hi experts,
how to get the Ship-to-Party text for an Order from R/3 to CRM?
Here I used a Function Module CRM_ORDER_READ and its working in the Development server.
After when this passed to the Stage Server for the Order i am maintaining the same Ship-to-Party for the order in the Stage server and I am no getting the text for that{Text maintained for the Ship-to-Party in the stage server}.
Thanks in advance.Hello Nilaksha.
You can use the following query. Modify the segment to be queried if you wish.
SELECT cc.segment1||'.'||segment2||'.'||segment3||'.'||segment4 "Account",
nvl(sum(l.accounted_dr - l.accounted_cr),0) "Balance"
FROM gl_code_combinations cc,
gl_je_lines l
WHERE cc.code_combination_id = l.code_combination_id
AND l.set_of_books_id = <your set_of_books_id'
AND cc.segment2 = 'your segment value'
AND l.effective_date <= '30-nov-09'
GROUP BY cc.segment1||'.'||segment2||'.'||segment3||'.'||segment4
Hope this helps.
Octavio -
Need to get the Last Changed date in Purchase Order.
Dear Experts,
I need to get a table which stores the last/ latest change for a Purchase Order.
For a Purcahse Order, last date Changes need to be captured , where there was some sort of activity associated with that order. That activity could be a goods receipt, an invoice payment or a change to the Purchase order.
Thanks in advance.Hi,
You can use EKPO-AEDAT.
Tables CDHDR and CDPOS contain what chnages you have made.
Thanks,
Ramakrishna
Message was edited by: Ramakrishna Prasad Ramisetti -
Get the Change history of a Purchase order
Hi Gurus,
We have custom workflow which will send a mail to the user when he creates a new PO using Me21n.
Our requirement is to send a mail to the user when he add a new line item to the existing PO.
The big question is How to find a new line item added to the existing PO?
Suggest us any Function module that will give the new line added to an existing PO or How to get it from table CDHDR and CDPOS?
Regards
Paul
Edited by: Paul Paul on Jun 16, 2009 1:27 PM
Edited by: Paul Paul on Jun 16, 2009 1:27 PMnot sure..........hv u checked the below scenario?
If a line item is changing/deleted.........then, Is it creating a CDHDR/CDPOS record? if so, How you r differentating btwn a creation of line item and changed item/deleted item. I do not hv a SAP access these days, so i can not check it.
thanq -
Function module to get the payment details for PO
Hi,
Is there any standard function modlue to get the payment details for specific purchase order or is there any table where we can get the payment details till date.
My requirement is purchase order wise how much already paid to vendor and what is the balance amount to be paid vendor.
thanks in advance....
Regards,
SreeHello
BAPI_PO_GETDETAIL will help you.
Look at structures PO_ITEM_HISTORY and PO_ITEM_HISTORY_TOTALS
Also you may use table EKBE -
Which table stores the condition values of a purchase order line item?
Hi,
Please let me know the table that stores the condition values of purchase order line items(when we click on conditions tab after selecting an item then we can see the condition types and there is a corresponding condition value for that condition type.
My requirement is to get the actual price for a purchase order line item(it can be seen in the last line and it is calculated after considering all the condition types) and display this value in a custom report.
Thanks,
RavindraHi Ravindra
You can find the conditions data for PO in TAble KONV.
KONV-KSCH is the condition type
KONV-KWERT is the cond value
KONV-KNUMH is the condition doc no. which is there in EKKO field KNUMH.
So u have to make a link between KONV-KNUMH and EKKO-KNUMH.
Thanks
Vijeta -
Function module to get the BOM details for a material-plant combination
hi
Is there any function module to get the BOM details such as
BOM Usage -STLAN
Alternative BOM -STLAL
Items -POSNR
Required Quantity-EMENG
Resulting Quantity-MENGE
Unit of measure -BMEIN
Base unit of measure-MEINS
for a given material-plant combination
if so please suggest me some FMs.................
Awaiting for ur reply..............try the below fm it may be useful for you
DATA : BEGIN OF I_BOM OCCURS 0.
INCLUDE STRUCTURE STPOX.
DATA : END OF I_BOM.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'PP01'
DATUV = SY-DATUM
MEHRS = 'X'
MTNRV = P_MATNR
WERKS = P_WERKS
TABLES
STB = I_BOM
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
CONVERSION_ERROR = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
just befor use it check your application area.for my case it is PP01. you can find it in CS12 when you are exploding the bom the value you are giving in BOM application that is the value for CAPID.
Just go to se37 and checkout the fm it has lot of options here I am using the minimum things.
regards
shiba dutta -
I need a Functional module to get the header material from the component .
Dear Guru's
Please help me .
I need a name of the Functional module to get the header material from the component .
As in if I put the Component in the Input I should get ALL the Main header materials using this Component.
Regards,
Roshan Lilaram Wadhwani.This was not answered
-
Is there any function module to get the variables used in a query?
Hi experts
Please, do you know if is there any function module to get the variables used in a query?
Thanks and regards
LuisHi Srini
Yes, I have checked the tables but I need a function module
Thanks anyway!
Luis -
I guess I was not clear.....my fault....let me re-phrase: frequently I send an email to multiple contacts.....I'm constantly changing my selection of multiple contacts so using the "group" function doesn't get the job done.......so how can I go through my list of contacts and quickly select those contacts that I want to receive that particular email....thx
You need an app that allows group messaging. Enter group messenger in the search bar in the app store.
-
Function module to get the configuration of Individual objects
Hi all,
Is there is any std function module to get the data of individual object configuration.
In table COM_TA_R3_ID, I can able to get the PRODUCT_GUID (for material and serial number) and I dont know how to get the configuration of the product by using the PRODUCT_GUID.
Pl through some light on this.
Regards
A.Sureshbabu.Hi,
You can get the item configuration using FM CRM_CONFIG_READ_OW.
This is used to read the product configurations for IPC calls.
Just pass the configured item guid and it will return the configuration data.
Use FM CRM_PRODUCT_I_READ_OW to get the product configurations but this FM checks whether any item has this product guid.
Regards,
Arun Kumar
Edited by: Arun Kumar on May 12, 2010 10:20 AM -
Function Module for getting the System time.
Hello All,
Which is the Function Module used in APO to get the system time?
Thanks for your response in advance.
Regards, ChiragHi Chirag,
Please try the following function modules
1) /SAPAPO/CRES_GET_TIMESTREAM_BT
2) /SAPAPO/OM_TIME_GET
The field name for system time is UZEIT under
structure SYST
Also try
3) CALENDAR_GET_TIMESTAMP
4) SAL_CSM_RECEIVER
I guess the third one will have your required data
Regards
R. Senthil Mareeswaran. -
How do i get the material type after submitting a create material request?
Hi All,
I have to select an agent depending on the material type of the material being created? I'm not using the rule based workflow for material creation in MDG 7.0, I'm using WS46000057. How do I get the material type being used in the workflow so that I can create a rule and select an agent accordingly from a custom table.
Any kind of help would be sincerely appreciated.
Regards,
Tushar..Why not use the rule-based workflow template?
Where do you want the material type? This is a standard workflow template and I'm not sure you can enhance it.
In any case, in order to read CR details, you need to use the MDG API classes. These are described in this document: Master Data Governance Application Programming Interface Guide. Keep in mind that different API classes were developed for different releases so make sure to pick the class right for your release. -
Function Module to get the TIMESTAMP
Hi,
Is there any function module to get the TIMESTAMP as Outout , if i give input Time and Date.
Or,
If I go for the concatenate statement.. Do I need to concate the commas in to the target field?
Because,
I am not getting the proper result with this concatenate statement where I concatenated the YYYYMMDDHHMMSS in to the DECIMAL 15 Variable.
Thanks,
Naveen Inuganti.Hi use
IB_CONVERT_INTO_TIMESTAMP' or IB_CONVERT_FROM_TIMESTAMP'
Example:
* Declaring the work variables.......................
DATA :
timestamp like TZONREF-TSTAMPS,
time like sy-uzeit,
date like sy-datum.
* The following function module is used to convert the
* time and date into GMT timestamp
CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
EXPORTING
i_datlo = sy-datum
i_timlo = sy-uzeit
I_TZONE = 'INDIA'
IMPORTING
E_TIMESTAMP = timestamp.
* The following function module is used to convert the
* above obtained timestamp to PST time zone date and time.
CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
EXPORTING
i_timestamp = timestamp
I_TZONE = 'PST'
IMPORTING
E_DATLO = date
E_TIMLO = time.
write :/ 'Date and Time at PST zone is ',date, time.
Maybe you are looking for
-
Error : HTTP Connection to ABAP Runtime failed
Hi, i am working on xml to flatfile interface.when i am trying to test the scenario from ID - > Tools -> Test configuration option i am getting below error. Receiver Determination <Not found> Internal Error Http connection to ABAP runtime failed.
-
After updating to IOS8, my iPad 2, which has both AT&T cellular and wifi, needs to be completely turned off and rebooted to get cellular service. Does anyone else have this issue ?
-
I just bought new Mac mini and attached to external monitor using hdmi cord. Worked fine for a day, but now screen is dark and I can't seem to wake it up. Have tried turning both computer and monitor on and off and I can m Hear Mac mini making soun
-
Enormous bug with intel and hdv
dear Friends, I discovered a bug testing my octocore intel with compressor. Unfortunately, encoding a file from hdv to m2v, an intel processor is 4 times slower than a non-intel processor, ...only in this case...! An 1,30 minutes clip needs 12 minute
-
I need to send sm37 Spool Report Automatically to one or more user ids.
Hai Gurus, I need to send sm37 Spool Report Automatically to one or more user ids. Kindly guide me