FM to get Item Guids from Header Guid?

Hi Experts,
I have the order header guid. Is there any Function Module to get the corresponding item guids for that header if we just pass the header guid as input?
(Other than CRM_ORDER_READ)
Any pointers will be appreciated!
Thanks and Regards,
Rohit
Edited by: rohit raturi on Aug 4, 2008 11:22 AM

Hi Lilach,
Thanks for the response.But actually table read is always expensive. I want to put some checks before order save.But when I am calling CRM_ORDER_READ inside ORDER_SAVE BADI, I am getting the exception-SY_CX_NO_HANDLER.
Any idea why this exception is coming?
Thanks and Regards,
Rohit

Similar Messages

  • How to get item stock from bin location with serial numbers?

    Dear experts
    I want to write query for getting item stock from bin location with serial numbers..
    Thank you
    Santosh Dhere.

    Hi Santosh,
    Try this:
    SELECT T0.[ItemCode], T5.[DistNumber], T5.[MnfSerial], T5.[LotNumber], T3.[OnHandQty]
      , T1.[BinCode], T1.[WhsCode]
    FROM  [dbo].[OIBQ] T0
      INNER  JOIN [dbo].[OBIN] T1  ON  T0.[BinAbs] = T1.[AbsEntry]  AND  T0.[OnHandQty] <> 0
      LEFT OUTER JOIN [dbo].[OBBQ] T2  ON  T0.[BinAbs] = T2.[BinAbs]  AND  T0.[ItemCode] = T2.[ItemCode]  AND  T2.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OSBQ] T3  ON  T0.[BinAbs] = T3.[BinAbs]  AND  T0.[ItemCode] = T3.[ItemCode]  AND  T3.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OBTN] T4  ON  T2.[SnBMDAbs] = T4.[AbsEntry]  AND  T2.[ItemCode] = T4.[ItemCode]
      LEFT OUTER  JOIN [dbo].[OSRN] T5  ON  T3.[SnBMDAbs] = T5.[AbsEntry]  AND  T3.[ItemCode] = T5.[ItemCode]
    WHERE T1.[AbsEntry] >= (0)  AND  (T3.[AbsEntry] IS NOT NULL)
    UNION ALL
    SELECT T0.[ItemCode], T5.[DistNumber], T5.[MnfSerial], T5.[LotNumber], T0.[OnHandQty]
      , T1.[BinCode], T1.[WhsCode]
    FROM  [dbo].[OIBQ] T0
      INNER  JOIN [dbo].[OBIN] T1  ON  T0.[BinAbs] = T1.[AbsEntry]  AND  T0.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OBBQ] T2  ON  T0.[BinAbs] = T2.[BinAbs]  AND  T0.[ItemCode] = T2.[ItemCode]  AND  T2.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OSBQ] T3  ON  T0.[BinAbs] = T3.[BinAbs]  AND  T0.[ItemCode] = T3.[ItemCode]  AND  T3.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OBTN] T4  ON  T2.[SnBMDAbs] = T4.[AbsEntry]  AND  T2.[ItemCode] = T4.[ItemCode]
      LEFT OUTER  JOIN [dbo].[OSRN] T5  ON  T3.[SnBMDAbs] = T5.[AbsEntry]  AND  T3.[ItemCode] = T5.[ItemCode]
    WHERE T1.[AbsEntry] >= (0)  AND  (T2.[AbsEntry] IS NULL   AND  T3.[AbsEntry] IS NULL)
    UNION ALL
    SELECT T0.[ItemCode], T0.[SRNDistNumber], T0.[SRNMnfSerial], T0.[SRNLotNumber], T0.[IBQOnhandQty] - T0.[OnHandQty]
      , T0.[BinCode], T0.[WhsCode]
    FROM  (
      SELECT T0.[BinAbs], T0.[ItemCode], MAX(T0.[OnHandQty]) AS 'IBQOnhandQty', SUM(T2.[OnHandQty]) AS 'OnHandQty', N'' AS 'BTNDistNumber', N'' AS 'BTNMnfSerial'
      , N'' AS 'BTNLotNumber', N'' AS 'SRNDistNumber', N'' AS 'SRNMnfSerial', N'' AS 'SRNLotNumber', MIN(T5.[AbsEntry]) AS 'AbsEntry', MIN(T1.[BinCode]) AS 'BinCode'
      , 10000044 AS 'SnbType', MIN(T5.[AbsEntry]) AS 'BTNAbsEntry', MIN(T5.[AbsEntry]) AS 'SRNAbsEntry', MIN(T1.[WhsCode]) AS 'WhsCode', MIN(T1.[SL1Code]) AS 'SL1Code'
      , MIN(T1.[SL2Code]) AS 'SL2Code', MIN(T1.[SL3Code]) AS 'SL3Code', MIN(T1.[SL4Code]) AS 'SL4Code', MIN(T1.[SL1Abs]) AS 'SL1Abs'
      , MIN(T1.[SL2Abs]) AS 'SL2Abs', MIN(T1.[SL3Abs]) AS 'SL3Abs', MIN(T1.[SL4Abs]) AS 'SL4Abs'
      FROM  [dbo].[OIBQ] T0
      INNER  JOIN [dbo].[OBIN] T1  ON  T0.[BinAbs] = T1.[AbsEntry]  AND  T0.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OBBQ] T2  ON  T0.[BinAbs] = T2.[BinAbs]  AND  T0.[ItemCode] = T2.[ItemCode]  AND  T2.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OSBQ] T3  ON  T0.[BinAbs] = T3.[BinAbs]  AND  T0.[ItemCode] = T3.[ItemCode]  AND  T3.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OBTN] T4  ON  T2.[SnBMDAbs] = T4.[AbsEntry]  AND  T2.[ItemCode] = T4.[ItemCode]
      LEFT OUTER  JOIN [dbo].[OSRN] T5  ON  T3.[SnBMDAbs] = T5.[AbsEntry]  AND  T3.[ItemCode] = T5.[ItemCode]
      WHERE T1.[AbsEntry] >= (0 )  AND  (T2.[AbsEntry] IS NOT NULL)
      GROUP BY T0.[BinAbs], T0.[ItemCode]
      UNION ALL
      SELECT T0.[BinAbs], T0.[ItemCode], MAX(T0.[OnHandQty]) AS 'IBQOnhandQty', SUM(T3.[OnHandQty]) AS 'OnHandQty', N'' AS 'BTNDistNumber', N'' AS 'BTNMnfSerial'
      , N'' AS 'BTNLotNumber', N'' AS 'SRNDistNumber', N'' AS 'SRNMnfSerial', N'' AS 'SRNLotNumber', MIN(T4.[AbsEntry]) AS 'AbsEntry', MIN(T1.[BinCode]) AS 'BinCode'
      , 10000045 AS 'SnbType', MIN(T4.[AbsEntry]) AS 'BTNAbsEntry', MIN(T4.[AbsEntry]) AS 'SRNAbsEntry', MIN(T1.[WhsCode]) AS 'WhsCode', MIN(T1.[SL1Code]) AS 'SL1Code'
      , MIN(T1.[SL2Code]) AS 'SL2Code', MIN(T1.[SL3Code]) AS 'SL3Code', MIN(T1.[SL4Code]) AS 'SL4Code', MIN(T1.[SL1Abs]) AS 'SL1Abs'
      , MIN(T1.[SL2Abs]) AS 'SL2Abs', MIN(T1.[SL3Abs]) AS 'SL3Abs', MIN(T1.[SL4Abs]) AS 'SL4Abs'
      FROM  [dbo].[OIBQ] T0
      INNER  JOIN [dbo].[OBIN] T1  ON  T0.[BinAbs] = T1.[AbsEntry]  AND  T0.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OBBQ] T2  ON  T0.[BinAbs] = T2.[BinAbs]  AND  T0.[ItemCode] = T2.[ItemCode]  AND  T2.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OSBQ] T3  ON  T0.[BinAbs] = T3.[BinAbs]  AND  T0.[ItemCode] = T3.[ItemCode]  AND  T3.[OnHandQty] <> 0
      LEFT OUTER  JOIN [dbo].[OBTN] T4  ON  T2.[SnBMDAbs] = T4.[AbsEntry]  AND  T2.[ItemCode] = T4.[ItemCode]
      LEFT OUTER  JOIN [dbo].[OSRN] T5  ON  T3.[SnBMDAbs] = T5.[AbsEntry]  AND  T3.[ItemCode] = T5.[ItemCode]
      WHERE T1.[AbsEntry] >= (0 )  AND  (T3.[AbsEntry] IS NOT NULL)
      GROUP BY T0.[BinAbs], T0.[ItemCode]
      ) T0
    WHERE T0.[IBQOnhandQty] > T0.[OnHandQty]
    Regards,
    JC.

  • How to get proxy-ip from header

    I am trying to get proxy-ip from the request header. I know using NSAPI, you can get IP like
    pblock_findval("ip", sn->client)
    But this only gives you the remote address. is there a way to get "proxy-ip"?
    Thanks!

    pblock_findval("proxy-ip", rq->headers)

  • Getting Item Text  from sale order items

    Hi All,
    I am trying to get sale order item text using Include text in smartforms.
    my text object  is VBBP and my text id is 0004.
    What should I pass in Text Name  ?.---Order Number or Item Nunmber or Both.
    If both can you guys explain how to pass both ?.
    will be REVARDED.

    Hi,
    When you see the texts in the line item of va03..
    Double click on the text..
    Then in the menu..Goto -> Header..
    There you can find the Text name..
    Generally if it is Item text..Then the text name will be
    order number + line item
    Thanks
    Naren

  • How to get security token from header?

    How can I generally access to the header information of the soap envelope of the ws request in a soa suite (11.1.1.6.0) component?
    (I need for the wsse Security token /username and password/ and addressing information in my composite. I need an own algorithm of authentication to use and implement.)
    I use BPEL process now, and found bpelx:headerVariable probably for that, but in JDeveloper expression builder there is no option for that in BPEL Extension Functions.
    Thanks

    pblock_findval("proxy-ip", rq->headers)

  • Get Items in CRM from the headere GUId

    Hi,
    Can anyone tell me how can we Get Items in CRM from the headere GUId?
    Thanks

    Use FM CRM_ORDER_READ.
    Pass Header GUID in table IT_HEADER_GUID
    Item details are displayed in ET_ORDERADM_I.
    You can also use test report 'CRM_ORDER_READ' if you have any test data
    Regards
    Kaushal

  • To get the guid of the current line item in report

    Hi,
    I am creating reporting program  for inserting new line item to a quotation.
    Using header guid (Hardcoded value) i am able to insert new line item and product.
    in order quantity value i need current line item guid.
    How can i get current line item guid so that i can insert quantity value to current line item?
    Thanks in advance
    Anil

    Hi Anil,
    You can get current item guid by using FM CRM_ORDERADM_I_READ_OB, but it will of no use. If you try to do this then in this case you have to call maintain FM 2 times, which is not recommended. First you have to create item and then you have to maintain quantity. You have to do all this in one maintain call.
    Regards,
    Bhushan

  • How to get Opportunity guid from business partner?

    Hi All,
    Could you please let me know function module for getting opportunity GUID from business partner (guid or id)? Where business partner is sales representative.
    Thanks,
    Anup Garg

    HI,
      go to the but000 give the partner number and get the partner guid. Pass your partner number in the table CRMD_ORDER_INDEX  and OBJECT_TYPE = BUS2000111 .
    Regards
    Srinu

  • I am unable to get dragging guides from rulers when using CS6 InDesign. Is anybody else getting this problem?

    I am unable to get dragging guides from rulers when using CS6 InDesign. Is anybody else getting this problem?

    Try restoring your InDesign preferences:
    Trash, Replace, Reset, or Restore the application Preferences

  • Function modules related to header and item GUID

    Hi,
    Please tell me the function modules related to header and item GUID.
    Thanq
    brahmaji

    You will need to be clearer about what you want to do. Try searching for function modules with names like "GUID". Also try searching forums first.
    Cheers
    Graham Robbo

  • How to get project GUID from project name?

    How to get project GUID from project name in Campaign mgmt ?

    hello,
    have a look in table CGPL_PROJECT.
    regards,
    Frédéric

  • How to copy header/item text from Quotation to sales order?

    Dear All,
    On ECC 6, I am trying to get text copied from the quotation to the sales order (when the order is created with reference to the quote).
    As of now, the order creation is fine with all the right items & partners etc. in it, but the text is missing.
    The same text IDs have been assigned to both documents (at header & item levels).
    Is the text content supposed to be copied by standard SAP? Is there any customizing needed for this? Please guide me on how I can achieve this.
    Please help.
    Thanks
    Best regards,
    Rohit L
    Edited by: Rohit Lokray on Nov 26, 2009 10:49 AM

    Hi Rohit,
    Pls check this e.g.
    Text Determination Procedure
    You can define text for
    Customer
    Sales document
    Delivery
    Billing 
    1) Create new text types
    (Menu Path:  SPRO-IMG-Sales and distribution- Basic function-Text Control-Define text type). You can define new text type in this menu for your requirement for different objects (Customer, Sales document, Delivery and billing document). T-code: VOTXN
    2) Assign the new text ID in the text   determination procedure
    (Menu Path:  SPRO-IMG-Sales and distribution-Basic function- Text Control-Define text type). Click on change on application tool bar. Select text procedure   created and double click on Text ID'  s in text Procedure. Assign new text Id to Text determination procedure
    3) Define and Assign an access sequence to the new text ID
    (Menu Path: SPRO-IMG-Sales and distribution-Basic function-Text Control-Define access sequence for determining text).Access sequence can be defined only for sales document not for customer master. Select text procedure and double click on text id's in text procedure folder. Select text id and double click on access sequence and create new access sequence here.
    4) Assign the Text determination procedure with the sales document type.
    (Menu Path: SPRO-IMG-Sales and distribution-Basic function-Text Control-Define and assign text determination procedure) In this menu path you can assign text determination procedure to sales document type.
    [http://help.sap.com/saphelp_erp60_sp/helpdata/en/90/758534c960a134e10000009b38f83b/frameset.htm]

  • How to get the guid of currently opened page programatically

    Hi,
    Can any one of you please let me know how to get the guid of a page at database level which is opened currently?
    The requirement is I need to grab the url of a page which is currently opened by the user.
    Is there any way to get it from accessing the tables like wwv_things or wwpob_page$.
    Please suggest me how to get it.
    Thanks,
    Ravi.

    Hi Ravi,
    You may wanna explore the two API's (wwsbr_all_folders and wwsbr_all_items) and make a bridge to get the name of the portlets that appear on the page.
    something of the following nature should be enough to take you where you want to go. here c.name is the GUID of the item you are looking for.
    SELECT DISTINCT c.display_name,c.name,c.updatedate
    FROM portal.wwsbr_all_folders a, portal.wwsbr_all_items c
    WHERE a.LANGUAGE = 'us'
    AND a.id = c.folder_id
    AND a.caid = c.caid
    AND c.itemtype = 'baseportletinstance'
    AND a.Name LIKE 'MY_PAGE_NAME'
    order by 3 desc
    this will work in the portal but not in the sqlplus or any querying tool. for that purpose, it will work once you establish the context of user.
    hope that helps!
    AMN

  • Reading the reference GUID (Item Guid) within an ABAP Date Rule

    I have created a new date rule in which a Z-function module is called. Within the function module I need to read data from the order (such as the Ibase Component). However I noticed that the within the Z-function module the import parameter provided by the system is only the 'context' class which does not contain an attribute for the item guid for which the date rule applies.
    How can I get the service order item GUID within the ABAP date rule (i.e. function module)?
    Thanks,
    Patrick

    Hi Patrick,
    Could you share me how you call Z-FM in your own date rule? I am looking for a solution for a simple senario - just today's date + duration which is stored in a product master data. I am thinking your solution might be suitable. Thanks a lot.
    Best regards,
    Allan

  • How to get item from dictionary

    I created dictionary and create two variables in SharePoint Designer 2013 workflow:
    Name: Accept; Type: string; Value:  application/json;odata=verbose;
    Name: Content-Type ; Type: string; Value: application/json;odata=verbose;
    Output variable: JSonRequestHeader.
    I called HTTP web service:
    https://xxxxxx/_api/web/Lists/getbytitle('WorkflowTaskList')/items?$select=ID
    then Get d/results from Variable:JSonResponse(Output to Variable: allItemsData)
    then Count Items in Variable: allItemsData(Output to Variable: allItemsIDData)
    These Actions worked well.
    How I can get item’s ID number from dictionary?
    Get d/results[%Variable: index%] or Get d/results([%Variable: index%]) where
    index = 0,1,2….. did not extract ID numbers from dictionary
    I would be grateful for any help.
    bnossov

    Andy,
    Get d/results/[your index variable]/id or Get d/results/[your index variable]/ID
    does not work.
    The web service
    https://xxxxxx/_api/web/Lists/getbytitle('WorkflowTaskList')/items?$select=ID
    gives me:
     <?xml version="1.0" encoding="utf-8"
    ?>
    <feed xml:base=https://xxxxxxxx/_api/ xmlns="http://www.w3.org/2005/Atom"
    xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
    xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
      <id>07ac172a-107a-4058-bdc5-8dead90a39ec</id>
      <title
    />
      <updated>2014-04-16T20:51:04Z</updated>
    <entry m:etag=""2"">
      <id>de27ea13-0f4c-4e94-97de-2ccb535ad8f4</id>
      <category
    term="SP.Data.WorkflowTaskListListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
      <link
    rel="edit" href="Web/Lists(guid'd840c4a5-5692-430b-8e7a-a435f8b6e8c0')/Items(62)" />
      <title
    />
      <updated>2014-04-16T20:51:04Z</updated>
    <author>
      <name
    />
      </author>
    <content type="application/xml">
    <m:properties>
      <d:Id m:type="Edm.Int32">62</d:Id>
      <d:ID m:type="Edm.Int32">62</d:ID>
      </m:properties>
      </content>
      </entry>
    <entry m:etag=""3"">
      <id>3864b871-36eb-4594-b8c4-2bae909ea1ff</id>
      <category
    term="SP.Data.WorkflowTaskListListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
      <link
    rel="edit" href="Web/Lists(guid'd840c4a5-5692-430b-8e7a-a435f8b6e8c0')/Items(63)" />
      <title
    />
      <updated>2014-04-16T20:51:04Z</updated>
    <author>
      <name
    />
      </author>
    <content type="application/xml">
    <m:properties>
      <d:Id m:type="Edm.Int32">63</d:Id>
      <d:ID m:type="Edm.Int32">63</d:ID>
      </m:properties>
      </content>
      </entry>
    <entry m:etag=""3"">
      <id>b78c4a1a-5be4-40b1-98e6-98f702602056</id>
      <category
    term="SP.Data.WorkflowTaskListListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
      <link
    rel="edit" href="Web/Lists(guid'd840c4a5-5692-430b-8e7a-a435f8b6e8c0')/Items(64)" />
      <title
    />
      <updated>2014-04-16T20:51:04Z</updated>
    <author>
      <name
    />
      </author>
    <content type="application/xml">
    <m:properties>
      <d:Id m:type="Edm.Int32">64</d:Id>
      <d:ID m:type="Edm.Int32">64</d:ID>
      </m:properties>
      </content>
      </entry>
     </feed>
    I need to get d:ID value.
    Thanks in advance for your help.
    bnossov

Maybe you are looking for