Get purchase order doc date using BAPI function module

Hi,
I have a .net windows application that uses BAPI_PO_GETDETAIL function module to get particular details of a PO in SAP. But i am not able to get the "Doc Date" for a particular PO. I am able to get all the details of items from the table "PO_ITEMS ". I used only 1 input parameter "PURCHASEORDER".
Please help me to get this thing done
.netframework : 4.0
Language: C#
Visual Studio: vs 2010
Regards,
Manosh Jacob

Absolutely hynek petrak..
Manosh Jacob You can go with the above technique.

Similar Messages

  • To get evt_creation_date and _evt_creation_time data in a function module

    Hi gurus,
    How do we get evtcreation_date and evtcreation_time data into check function module or implementation of object type? I am using cdhdr and cdpos and able to write my own logic.
    Thanks in advance!!!
    Xevi G.

    I think check FM's contain these value in any paramters.
    Otherwise check CDHDR/CDPOS with appropriate OBJECT number etc.
    This question can more appropriately answered in WORKFLOW forum.
    Try [this|http://www.*******************/2007/09/work-flow-2.html] link also.

  • Creating/confirming transfer order (WM) using bapi/function modules

    Hi,
    I usually use BDC to create transfer orders or other documents in WM, but i've been told that using BAPI is more correct. I'm new to this concept, so could you please tell me how i can find the apropriate BAPI/function modules available for this purpose in 46C ?
    I thank you in advance,
    Bruno

    Hi Gisk,
    i am trying ot create a TO based on a material document and year. Same function as transaction LB12. Do you know which function module i can use for this.
    I am trying to use the function module L_TO_CREATE_SINGLE, i fill in the T_LTAK-MBLNR and T_LTAK-MJAHR. But do not know which fields to fill in.
    Hope you can help me.
    Grtz
    Coeno

  • Updation of material data using a function module

    HI
      i want to update fields in the mvke table,but the field is a Customer field in the table, not sap table field.i want to update the field using a program , not going to mm02. which function can i use for the updation.There is a function module MATERIAL_MAINTAIN_DARK for updation,will this funtion module update the customer fields also. Can anyone tell me about this function module and how to use this function module or MATERIAL_MAINTAIN_DARK.

    Using the function Module BAPI_MATERIAL_SAVEDATA , you can also update the custom fields.
    This is the documentation for the extension fields:
    <b>Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIO
    Description
        You use this structure to transfer the material's customer-defined
        fields. For information on transferring these fields, see the function
        module documentation.
    Note
        Besides the table fields already defined, customer-defined table fields
        can also be supplied with data. Since these fields are created by the
        customer, they are known only during the runtime and must therefore be
        determined dynamically.
        The structures BAPI_TE_<NAME> (<NAME> = MARA, MARC, MARD, MBEW, MLGN,
        MLGT, MVKE) and the relevant checkbox structures BAPI_TE_<NAME> (<NAME>
        = MARAX, etc.) must first be extended by the customer to include the
        fields required. The standard structures contain only the corresponding
        key fields. When including new fields in these structures, make sure
        that the field has the same name as the field in the database table. In
        addition, the fields in the structures BAPI_TE_<NAME> may only be of the
        type CHARACTER. The data element BAPIUPDATE must be used for the fields
        in the checkbox structure (except for key fields).
        The two parameters EXTENSIONIN and EXTENSIONINX are used to transfer the
        data to the method. The field STRUCTURE contains the name of the
        structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX) used to identify
        the work area (for example, WA_BAPI_TE_MARA or WA_BAPI_TE_MARAX) to
        which the data is transferred. The remaining fields for the parameter
        EXTENSIONIN or EXTENSIONINX contain the data for the key fields (for
        example, the material number) and the data for the customer-defined
        fields. The number of characters reserved in the two parameters for the
        content of a customer-defined field must be the same as the number of
        characters for the corresponding work area field. If the number of
    characters required is smaller, the remaining characters in the two
    parameters must be filled with blanks. Only then may the content of
    another field be transferred. Here too, remember that the data is
    written to the database only if the corresponding indicator has been set
    in the work area.</b>
    Regards,
    ravi

  • How to use BAPI function module for maintaing product type to material

    Hi,
    Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
    for maintaining the product type for the material using change number.
    Pts will be rewarded.
    Best Regards,
    Padhy

    Hi,
    Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
    for maintaining the product type for the material using change number.
    Pts will be rewarded.
    Best Regards,
    Padhy

  • How create a purchase order without imputation using bapi: BAPI_PO_CREATE1

    Hello Forum
    I have an request for purchase order with imputation K (cost center, EBAN-KNTTP). During the liberation of the request for purchase order, and using the Bapi: BAPI_PO_CREATE1, I want to create a Purchase Order without imputation (imputation empty or charge empty).
    The system displays the following error: The request for purchase order, item (position) 10, is attributed to another order...
    I imagine that is because the request for purchase order has imputation (charged) K and the purchase order will have no type of imputation (imputation empty).
    However, manually, Yes, I can create the purchase order. That is, I first release, the request for purchase order. Then I create the order of purchase using ME21 and with reference to request for purchase order, and when SAP returns the items of the request for purchase order, I manually remove the imputation K, and these items to become the purchase order.
    Please support me want to know how to resolve this case, why can not I create a purchase order without imputation to from the request for purchase order with imputation K, using Bapi
    Thank you.
    Greetings,

    Hi,
    In the item overview of the purchase order creation screen (ME21N), you have a column Purchasing Doc and next it item no.  You can give the existing purchase order number here with item no which will create a purchase order, and changes can be made wherever you require.
    Hope this helps.
    Thanks
    Krishna.

  • How we will use bapi function modules Ex. BAPI_SALESORDER_CHANGE

    How we will pass the parameters to this Function Module.
    What is the step by step process .

    HI,
    Check this code... Here this program is changing the delivery block for a sales order.. like this you just need to identify what you want to change and pass data to the bapi as required.
    DATA: BAPISDH1X LIKE BAPISDH1X.
    DATA: BAPISDH1 LIKE BAPISDH1.
    PARAMETERS: P_VBELN LIKE VBAK-VBELN OBLIGATORY.
    PARAMETERS: P_LIFSK  LIKE VBAK-LIFSK OBLIGATORY.
    Header
    BAPISDH1-DLV_BLOCK = p_lifsk.   " Delivery block
    header X
    BAPISDH1X-DLV_BLOCK = 'X'.   " Delivery block
    BAPISDH1X-UPDATEFLAG = 'U'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = P_VBELN
    order_header_in   = BAPISDH1
    order_header_inx = BAPISDH1X
    tables
    return = T_RETURN
    LOOP AT T_RETURN WHERE TYPE = 'E' OR TYPE = 'A'.
      EXIT.
    ENDLOOP.
    Check for error messages.
    IF SY-SUBRC = 0.
      WRITE: / 'Sales order not updated', T_RETURN-MESSAGE.
    ELSE.
    Successfully updated
      WRITE: / 'Sales order updated'.
    ENDIF.
    COMMIT WORK.
    Thanks
    mahesh

  • Material creation for All VIEW using BAPI Function modules

    Dear All,
                 I want to create materials for all views using BAPI F.Ms. By using BAPI_MATERIAL_SAVEDATA i have extended materials for for only specified views. now my requirement is to create Material with All views including Classfication view also. For this i found BAPI_OBJCL_CREATEFM.
             Tell me that shall i use both Fm's at time to create material.Will it work? According to my knowledge we need to create Characters first ,then we should  assign this character to this class, then while creation of material we should select this class .
            so pls guide me the procedure to follow for both FM's .
    Note : Pls don't suggest me LSMW OR BDC procedure.
    regards,
    Prashanth Maturu.

    Hi prashanth,
    U can use both the FM. using BAPI_MATERIAL_SAVEDATA u can create all the views and for classification view use BAPI_OBJCL_CREATE. before assigning class to material u hve to make sure that the characteristics are uploaded and is attched to the class using transaction CL03.
    Regards,
    Anil N.

  • Please send me fm regarding to get purchase order and change purchase order

    Hi,
    Please send me fm regarding to get purchase order and change purchase order .
    Regards,
    Gurprit Bhatia

    Hi,
    Function module to get the purchase order details:
    BAPI_PO_GETDETAIL.
    data: po_items type table of bapiekpo with header line.
    parameters: p_ebeln type ekko-ebeln.
    call function 'BAPI_PO_GETDETAIL'
      exporting
        purchaseorder                    = p_ebeln
      ITEMS                            = 'X'
      ACCOUNT_ASSIGNMENT               = ' '
      SCHEDULES                        = ' '
      HISTORY                          = ' '
      ITEM_TEXTS                       = ' '
      HEADER_TEXTS                     = ' '
      SERVICES                         = ' '
      CONFIRMATIONS                    = ' '
      SERVICE_TEXTS                    = ' '
      EXTENSIONS                       = ' '
    IMPORTING
      PO_HEADER                        =
      PO_ADDRESS                       =
    tables
      PO_HEADER_TEXTS                  =
       po_items                         = po_items
      PO_ITEM_ACCOUNT_ASSIGNMENT       =
      PO_ITEM_SCHEDULES                =
      PO_ITEM_CONFIRMATIONS            =
      PO_ITEM_TEXTS                    =
      PO_ITEM_HISTORY                  =
      PO_ITEM_HISTORY_TOTALS           =
      PO_ITEM_LIMITS                   =
      PO_ITEM_CONTRACT_LIMITS          =
      PO_ITEM_SERVICES                 =
      PO_ITEM_SRV_ACCASS_VALUES        =
      RETURN                           =
      PO_SERVICES_TEXTS                =
      EXTENSIONOUT                     =
    check sy-subrc  = 0.
    loop at po_items.
      write:/ po_items.
    endloop.
    Check this program too:
    RFFMFG_INV_CANC_ALL for BAPi_PO_GET_DETAIL.
    Hope it helps you.
    Regards,
    Anjali

  • Partner Function Upload using BAPI function BAPIBUSISM007_CREATEFROMDATA

    Hi Guys,
    I can able to create Business Partner in SAP using BAPI function module BAPIBUSISM007_CREATEFROMDATA but i don't able to upload partner function (i.e. It will come under Sales Area)  using this BAPI. I don't want to go for BDC method.Is there any function modules. Is there any function modules or BAPI to upload partner function. Please suggest me.
    Thanks in Advance.
    Regards,
    Anil.

    Dear Anil,
    Few days back even i faced similar problem to upload partner function through BAPI.
    Later i created LSMW for XD02 and uploaded partner functions for those BPs.
    You can try the same.
    Regards,
    Rajesh

  • Header Pricing conditions in BAPI function module

    I am using BAPI function module BAPI_SALESDOCU_CREATEFROMDATA1 to create sales orders through program.
    It is working fine with item level pricing conditions.
    But my requirement is ... I need to update few pricing conditon types in item level and one in header level.
    Could you please help me where I need to pass header pricing conditions. Please help me.
            CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
              EXPORTING
                SALESDOCUMENT             = SALESDOCUMENT
                SALES_HEADER_IN           = SALES_HEADER_IN
              SALES_HEADER_INX          =
              SENDER                    =
                BINARY_RELATIONSHIPTYPE   = 'VORL'
              INT_NUMBER_ASSIGNMENT     = ' '
              IMPORTING
                SALESDOCUMENT_EX          = SALESDOCUMENT_EX
              TABLES
                RETURN                    = RETURN
                SALES_ITEMS_IN            = SALES_ITEMS_IN
              SALES_ITEMS_INX           =
                SALES_PARTNERS            = SALES_PARTNERS
                SALES_SCHEDULES_IN        = SALES_SCHEDULES_IN
              SALES_SCHEDULES_INX       =
                SALES_CONDITIONS_IN       = SALES_CONDITIONS_IN.
              SALES_CFGS_REF            =
              SALES_CFGS_INST           =
              SALES_CFGS_PART_OF        =
              SALES_CFGS_VALUE          =
              SALES_CFGS_BLOB           =
              SALES_CCARD               =
              KEY_TABLE                 =
    Thanks in advance.
    Raghu

    If the correct configuration allows for manual entry of the condition type you want to populate, You can map your value using
    ' ORDER_CONDITIONS_IN'  . If item level map line number, cond step number of the condition type in your pricing procedure, your condition type you are using,  condition value you are sending into the system,  currency, and cond unit. If it is a header condition, then send in 000000 as the item number.   You can also consider using BAPI_SALESORDER_CREATEFROMDAT2

  • Webdynpro java  calling bapi function module

    Hi all,
         I am webdynpro java developer, In my application i created model using bapi function module and fetch those values using iviews mapping to custom controller . While running that application i got an error as shown below
    **Application error occurred during request processing.**
      Details:   com.sap.tc.webdynpro.services.sal.core.DispatcherException: The requested deployable object 'ram.com/getdata' and application 'Searchapp' are not deployed on the server. Please check the used URL for typos.
    Exception id: [BCAEC58D04E400870000019500000DF80004B20FE3921612]
    Please help me anyone
    Thanks in advance.

    Hi,
    Have you deployed your application?because it is mentioned that the "Searchapp"(which i suppose is your application) is not deployed.
    Take the "Deploy and Run" option by right clicking the application(i mn Seachapp). It will prompt you to enter the SDM password. Give the pwd and it will open the explorer and will show you the output.
    Hope this helps you.
    Regards,
    Jithin

  • Purchase order Delivery date based on PO doc no and PO item no

    hi all
    we have a  requirement to bring Purchase order delivery date in to our report .
    it is in EKET Table - field EINDT.
    Is it possible to get this PO Delivery date in to our data source 2lis_02_itm which has PO Doc no(EBELN) and PO item.no (EBELP).
    In EKET Table the primary key is based on 3 fields. PO Doc no(EBELN), PO Itm.no(EBLEP) and delivery schedule line counter (ETENR).
    In EKET Table the data is like
    PO.NO/PO itm no/ schline counter/delivery date
    1000/10/1/1-1-2011
    1000/10/2/5-1-2011
    1000/20/1/2-2-2011
    1000/20/2/2-2-2011
    1000/20/3/5-2-2011
    so on...
    IF i enhance my datasource and populate the delivery date based on EBELN and EBELP we get only 1 delivery date for all the different schedule lines which is wrong.
    I know there is a separate datasource for schedule line data for purchasing BUT IS IT POSSIBLE TO GET the delivery date based on the different schedules by using some ABAP CODE, SINCE in our datasource 2lis_02_itm we dont have ETENR( SCHEDULE LINE COUNTER FIELD).
    if we use the standard data source  (2lis_02_SCL )it is not fair to pull all that data since we only need 1 field from it.
    Please suggest
    Thanks & Regards.
    Krishna

    Hi Krishna,
    Even though you plan to write some ABAP code or do any processing for a combination of PO document no. and Item no. you will always get multiple records with different schedule line items and it is really impossible to take the delivery date without knowing schedule line item no.
    And even when you said PO delivery date, it is actually means delivery date of any of the schedule line only. If you want to write some ABAP logic then you will have to decide like whether you want to display the First line item date or the last line item date etc. But which is again not a good idea.
    I think you can go for schedule line extractor.
    Regards,
    Durgesh.

  • HOW CAN I GET THE PURCHASE ORDER RELEASE DATE

    Dear All,
    HOW CAN I GET THE PURCHASE ORDER RELEASE DATE - any reprot is there?
    Thank you
    Ahmad

    Hi,
    u goto that PO and select Environment on top line .under that select header changes if u click on that u will get entire details who reased when released, date , time etc
    regards,
    Srinivas Kona

  • Get purchase order number before saving

    Hi All,
    I am working on Purchase order Creation.
    I want to know the purchase order number before it was saved.
    I have used NUMBER_GET_NEXT function Module.But it is based on Number range.
    I dont want to get based on Number Range.
    I want to get the Get next number based on the Documnet TYpe.
    Is there any possiablity to get that.If yes please let me know.
    Thanks,
    Swapna.

    Hi,
    data : lv_ebeln type ebeln.
    Select single MAX( EBELN ) from EKKO into LV_EBELN.
    Next PO Number =  LV_EBELN + 1.
    Try this.
    This will work if maintain only one number rage object for PO Number.
    Thanks,
    Durai.V

Maybe you are looking for