Problem while creating credit memo request using BAPI

HI,
I am trying to create credit memo request using the BAPI_SALESDOCU_CREATEFROMDATA1..
I am getting the error as " No customer master data is available for the customer". But the customer exists in the KNA1 table. What is the mistake i hv done.. this s my code..
REPORT  ZSV_CREDITMEMO_TEST1.
Data declarations.
DATA: v_vbeln            LIKE vbak-vbeln.
DATA: header             LIKE bapisdhead1.
DATA: headerx            LIKE bapisdhead1x.
DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                         WITH HEADER LINE.
DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                         WITH HEADER LINE.
DATA: lt_schedules_ink    TYPE STANDARD TABLE OF bapisdhead1
                         WITH HEADER LINE.
START-OF-SELECTION.
Header data
Sales document type
  header-doc_type = 'G2'. 
  headerx-doc_type = 'X'.
Sales organization
  header-sales_org = '0001'.
  headerx-sales_org = 'X'.
Distribution channel
  header-distr_chan  = ''.
  headerx-distr_chan = 'X'.
Division
  header-division = ''.
  headerx-division = 'X'.
  headerx-updateflag = 'I'.
*Complete delivery
    header-COMPL_DLV = ''.
    header-COMPL_DLV = 'X'.
Partner data
Sold to
  partner-partn_role = 'AG'.
  partner-partn_numb = '0000C10130'.
  APPEND partner.
Ship to
  partner-partn_role = 'WE'.
  partner-partn_numb = ''.
  APPEND partner.
ITEM DATA
  itemx-updateflag = 'I'.
Line item number.
  item-itm_number = '000010'.
  itemx-itm_number = 'X'.
Material
  item-material = 'C20011'.
  itemx-material = 'X'.
Plant
  item-plant    = ''.
  itemx-plant   = 'X'.
Quantity
  item-target_qty = '10000'. 
  itemx-target_qty = 'X'.
item category
  itemx-ITEM_CATEG = 'X'.
  APPEND item.
  APPEND itemx.
  Fill schedule lines
  lt_schedules_in-itm_number = '000010'.
  lt_schedules_in-sched_line = '0001'.
  lt_schedules_in-req_qty    = '10000'.
  APPEND lt_schedules_in.
  Fill schedule line flags
  lt_schedules_inx-itm_number  = '000010'.
  lt_schedules_inx-sched_line  = '0001'.
  lt_schedules_inx-updateflag  = 'X'.
  lt_schedules_inx-req_qty     = 'X'.
  APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
  CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
       EXPORTING
            sales_header_in     = header
            sales_header_inx    = headerx
       IMPORTING
            salesdocument_ex    = v_vbeln
       TABLES
            return              = return
            sales_items_in      = item
            sales_items_inx     = itemx
            sales_schedules_in  = lt_schedules_in
            sales_schedules_inx = lt_schedules_inx
            sales_partners      = partner.
Check the return table.
  LOOP AT return WHERE type = 'E' OR type = 'A'.
    EXIT.
  ENDLOOP.
  IF sy-subrc = 0.
    WRITE: / 'Error in creating document'.
  ELSE.
Commit the work.
    COMMIT WORK AND WAIT.
    WRITE: / 'Document ', v_vbeln, ' created'.
  ENDIF.
can anyone tell what the error is.?

Hi
please look at code below code this succefully creating credit memo may some help to you
header-doc_type = 'ZS4'.
    PERFORM get_plant.
    headerx-doc_type    = 'X'.
    header-sales_org    = wa_temp1-vkorg.
    headerx-sales_org   = 'X'.
    header-purch_no     = wa_temp1-bstnk.
    header-distr_chan   = wa_temp1-vtweg.
    headerx-distr_chan  = 'X'.
    header-division     = wa_temp1-spart.
    header-purch_no_s   = wa_temp1-bstnk.
    headerx-division    = 'X'.
    wa_partner-partn_role = 'AG'.
    wa_partner-partn_numb = wa_temp1-kunnr.
    APPEND wa_partner TO it_partner.
    wa_partner-partn_role = 'WE'.
    wa_partner-partn_numb = wa_temp1-kunnr.
    APPEND wa_partner TO it_partner.
    CLEAR: wa_partner.
    LOOP AT lt_temp2 INTO wa_temp2 WHERE kunnr = wa_temp1-kunnr.
      "AND matnr = wa_temp1-matnr.
*wa_item-itm_number = wa_temp2-posnr .
      wa_item-material   = wa_temp2-matnr.
      wa_item-plant      = wa_temp2-werks.
      wa_item-req_qty    = wa_temp2-fkimg * 1000.
      wa_item-target_qty = wa_temp2-fkimg * 1000.
      APPEND wa_item TO it_item.
    ENDLOOP.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        order_header_in       = header
*   WITHOUT_COMMIT            = ' '
*   CONVERT_PARVW_AUART       = ' '
     IMPORTING
       salesdocument          = v_vbeln
*   SOLD_TO_PARTY             =
*   SHIP_TO_PARTY             =
*   BILLING_PARTY             =
       return                 = return
      TABLES
       order_items_in         = it_item
       order_partners         = it_partner.
    IF v_vbeln <> space.
      wa_vbeln-vbeln = v_vbeln.
      APPEND wa_vbeln TO lt_vbeln.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      HIDE wa_vbeln-vbeln.
      CLEAR: wa_partner,header,v_vbeln, wa_temp2.
      REFRESH: it_partner,it_item.
    ELSE.
*    LOOP AT return .
      it_error-srno = idx.
      it_error-err_msg = return-message.
      APPEND it_error.
*    ENDLOOP.
    ENDIF.
    idx = idx + 1.
  ENDLOOP.
Regards

Similar Messages

  • Create credit memo request using inbound IDOC

    Hi Experts,
    I want to create credit memo request using inbound IDOC, currently I am using GSVERF03 basic type and process code GSVE, I am getting below error:
    No records exist in T661W for vendor XXXXX, plant, unloading point
    Anyone suggest me is this correct message type to create credit memo request or suggest me the correct one. because we are working with customer sales order and invoice not with vendor purchase order.
    Thanks for your help.

    ah, apologies i read outbound! I think you are using the correct message type i.e. GSVERF.
    Can you not simply create the missing entry in T661W? i.e. for the missing records?

  • Error while creating Credit Memo Request for Milestone billing invoice

    Hi All,
    I have a scenario where i have Milestone billing(% based) at header level in Contracts. I create Invoice for that and then try to create Credit Memo Request with reference to the Invoice.
    Problem comes when we try to change the qty in the credit memo request. we are able to change the qty but the value is not changing. It remains the same constant value of that milestone.
    In my copy control from Invoice to Credit memo request for the item category i have maintained the pricing type as "C" because i want to copy and manual conditions.
    So kindly let me know which config setting should be done so that whenever i change the qty the value should also be changed.
    Please Note : This is happening only when my billing plan is at header level. For Billing plan at Item level its working fine.....
    Thanks.....

    Hiiii.....
    Can anyone please advise on the below issue of mine.....
    Thanks alot for the help.......in advance

  • Problem while creating serivce call ..using bapi

    Hi
    I am trying to create a service call using a BAPI(BAPI_FLIGHT_GETLIST) as given in the example...
    while creating the service call in the step Adapt Context  i can see Airline Destination from ,Destination to and max rows,
    i am not getting any choice to select dest from and to...
    and when it is finished.. the node bapi_flights_getlist doesnt have any subnodes like cityfrom country from ... flight list.. as shown in the example...
    Can anyone send me the screenshts of creating a service call specially the step Adapt context...to [email protected]
    points will be given..
    Regards,
    Kiran

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • BAPI to create credit memo requests in SAP

    Hi All,
    I have a requirement to create Credit memo request in SAP SD. I'm trying to use the BAPI which is used for Sales order creation - BAPI_SALESORDER_CREATEFROMDAT2 since credit memos are also sales orders of diff. sales document type. However, the BAPI throws an error as follows
    "Unpermitted combination of business object BUS2032 and sales doc. category K". 
    Does this mean that the business object BUS2032 does not support creation of cerdit memo request ? If yes, can anyone suggest an alternate BAPI  to be used to address this requirement ?
    Thanks,
    Venkat.

    Hi Venkatesh,
    Thanks you for your post, your post has helped me a ton in my work, Infact I was working on BAPI to
    Create Credit Memo request i.e BAPI_SALESORDER_CREATEFROMDAT2 as expected i got the same error as "Unpermitted combination of business object BUS2032 and sales doc. category K" and i tried on  other BAPI it worked, Just i need to know BUS2032 doesn't support Credit Memo Request, How we can find it
    to what Sales document it support?

  • Creating credit memo request - V1 498 / missing order quantity

    Hi Experts,
    could any of You pls help me with a credit memo creation issue?
    I credit memo needed to be created based on invoice, so configuration  and copy control is done as usual, but I have a failure during CR order creation referring to an invoice F2.
    I got an error message: V1 498 - Credit  already exist for item... - and no qty is transferred to new document
    I have gone thought the threads on Forum, but none of the suggested solution was appropriate to solve the issue:
    - the document flow is updated in copy control ,
    - I can no remove the schedule line flag at VOV7 - the order qty will be missed but target qty is used, and end up incompletition (VU 019 error messge), so billing is faile
    - completition control set as B at VOV7,
    Still have the problem
    Could any of You pls help me - answers will be appreciated.

    V1 498 - Credit already exist for item...
    What the above message means is that lines items have already been used as reference for the creation of credit memo request(s).
    Create a new sales order, delivery and billing document. Then create credit memo request with reference to this new billing document and test.
    In VTAF copy control, at item level, field "Pos./neg. quantity" dictates how the quantity in the source document is affected by copy control.
    PS - I tried to create credit memo with reference to billing document (F2), there were no issues there. Therefore I am taking that the issue is with credit memo request (copied with ref to billing document F2)

  • Create Credit Memo Request

    Hi,
    Is there a bapi which i can use to create credit memo request with reference from a billing document?
    dyl

    Hi Rakesh,
    thank you for your reply. I am using 4.6B. i do not see that function

  • Create Credit Memo Request through txn. FB65

    Hi Experts,
    I want to create Credit Memo Request through txn. FB65.I am using Bapi 'BAPI_ACC_DOCUMENT_POST' to create it.
    Can anyone please tell the the minimum parameters which I will pass in this BAPI to create CreditMemo Request?
    Helpul answers will be rewarded by points.
    Thanks
    Naveen Rana

    Hi Naveen,
    You run this BAPI by giving input till you get the result and then use it in your code.
    Some of the structure to post credit memos are
    *--Populating Header strucuture
    *--To upload the Header Structure required By BAPI
      wa_docheader-bus_act     = c_bus_act.
      wa_docheader-username    = sy-uname.
      wa_docheader-header_txt  = wa_lineitem-header_text.
      wa_docheader-comp_code   = wa_lineitem-header_company.
      wa_docheader-doc_date    = wa_lineitem-invoice_date.
      wa_docheader-pstng_date  = sy-datum.
      wa_docheader-fis_period  = '00'.
      wa_docheader-ref_doc_no  = wa_lineitem-invoice_number.
      wa_docheader-doc_type = wa_lineitem-document_type.
    Document type is KR for Invoice and KG for Credit Memos.
    *--Populating Accounts Payable table
    *--Populating Currency Item Structure
    Thanks
    Sudharshan

  • Creation of Credit memo Request using FM SD_SALESDOCUMENT_CREATE

    Hi Guys,
    I am using FM SD_SALESDOCUMENT_CREATE to create credit memo request from flat file.
    we are using variant configuration and characteristic values for material are not being populated. Rest of the sales document is created but characteristic values are missing.
    can any one help me if u have some information or some piece of code.
    here is the code i am using.
    LOCAL DATA DECLARATION
      DATA: L_WA_ORDER_CFGS_VALUE   TYPE BAPICUVAL,
            L_WA_ORDER_CFGS_REF     TYPE BAPICUCFG,
            L_WA_ORDER_CFGS_INST    TYPE BAPICUINS,
            L_WA_ORDER_CFGS_PART_OF TYPE BAPICUPRT.
      CONSTANTS: C_MARA   TYPE CHAR10 VALUE 'MARA',
                 C_300    TYPE CHAR03 VALUE '300'.
      IF FP_L_WA_CHAR-ITM_NUMBER  <> FP_V_ITEM_OLD.
      Build internal tables for material configuration
      Configuration: Reference Data
        L_WA_ORDER_CFGS_REF-POSEX     = FP_L_WA_CHAR-ITM_NUMBER.
        L_WA_ORDER_CFGS_REF-CONFIG_ID = FP_L_WA_CHAR-ITM_NUMBER.
        L_WA_ORDER_CFGS_REF-ROOT_ID   = FP_L_WA_CHAR-ITM_NUMBER.
        APPEND L_WA_ORDER_CFGS_REF TO FP_I_ORDER_CFGS_REF.
      Build internal table BAPICUINS
      Configuration: Instances
        L_WA_ORDER_CFGS_INST-CONFIG_ID  = FP_L_WA_CHAR-ITM_NUMBER.
        L_WA_ORDER_CFGS_INST-INST_ID    = FP_L_WA_CHAR-ITM_NUMBER.
        L_WA_ORDER_CFGS_INST-CLASS_TYPE = C_300.
        L_WA_ORDER_CFGS_INST-OBJ_TYPE   = C_MARA.
        L_WA_ORDER_CFGS_INST-OBJ_KEY    = FP_L_WA_CHAR-MATERIAL.
        APPEND L_WA_ORDER_CFGS_INST TO FP_I_ORDER_CFGS_INST.
      Configuration: Part-of Specifications
        L_WA_ORDER_CFGS_PART_OF-OBJ_TYPE   = C_MARA.
        L_WA_ORDER_CFGS_PART_OF-CLASS_TYPE = C_300.
        L_WA_ORDER_CFGS_PART_OF-OBJ_KEY    = FP_L_WA_CHAR-MATERIAL.
        APPEND L_WA_ORDER_CFGS_PART_OF TO FP_I_ORDER_CFGS_PART_OF.
        FP_V_ITEM_OLD = FP_L_WA_CHAR-ITM_NUMBER.
      ENDIF.
    Configuration: Characteristic Values
    Sales Document Item
      L_WA_ORDER_CFGS_VALUE-CONFIG_ID = FP_L_WA_CHAR-ITM_NUMBER .
      L_WA_ORDER_CFGS_VALUE-INST_ID = FP_L_WA_CHAR-ITM_NUMBER.
    Characteristic Name
      L_WA_ORDER_CFGS_VALUE-CHARC = FP_L_WA_CHAR-CHARC .
    Characteristic Value
      L_WA_ORDER_CFGS_VALUE-VALUE = FP_L_WA_CHAR-VALUE .
      APPEND L_WA_ORDER_CFGS_VALUE TO FP_I_ORDER_CFGS_VALUE.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
      CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
        EXPORTING
          SALES_HEADER_IN      = FP_WA_ORDER_HEADER_IN
          SALES_HEADER_INX     = FP_WA_ORDER_HEADER_INX
          BEHAVE_WHEN_ERROR    = C_R
          BUSINESS_OBJECT      = 'BUS2094'
        IMPORTING
          SALESDOCUMENT_EX     = L_SALESDOCUMENT
        TABLES
          RETURN               = L_I_RETURN
          SALES_ITEMS_IN       = FP_I_ORDER_ITEMS_IN
          SALES_ITEMS_INX      = FP_I_ORDER_ITEMS_INX
          SALES_PARTNERS       = FP_I_ORDER_PARTNERS
          SALES_SCHEDULES_IN   = FP_I_ORDER_SCHEDULES
          SALES_SCHEDULES_INX  = FP_I_ORDER_SCHEDULESX
          SALES_CONDITIONS_IN  = FP_I_ORDER_CONDITIONS_IN
          SALES_CONDITIONS_INX = FP_I_ORDER_CONDITIONS_INX
          SALES_CFGS_REF       = FP_I_ORDER_CFGS_REF
          SALES_CFGS_INST      = FP_I_ORDER_CFGS_INST
          SALES_CFGS_PART_OF   = FP_I_ORDER_CFGS_PART_OF
          SALES_CFGS_VALUE     = FP_I_ORDER_CFGS_VALUE
          SALES_TEXT           = FP_I_ORDER_TEXT.

    Hi, has your question be answered? What was the outcome / result?

  • How To Create Credit Memo Request In CRM

    Hi Friends,
    I have to create CMR i.e. Credit Memo Request with Header and Item details but I am not able to do it.
    Kindly let me know the BAPI / FM with some example. Also, do let me know which all values are mandatory for the FM or BAPI structures.
    I will definitely reward points if the solution will help me in creating the CMR.
    Thanks,
    Pradeep

    Hi Rekha,
    I have to create CMR with following details :
    Description To be displayed in Header
    Status : i.e. Create / Open
    Item Detail
    Product and quantity
    Hope I am clear in this.
    Regards,
    Pradeep Singh Dhadwal

  • BAPI_SALESDOCU_CREATEFROMDATA, create credit memo request

    hi all,
    in which field of BAPI_SALESDOCU_CREATEFROMDATA needs to fill in, i need to create SO Credit memo request (CR doc type ) with reference to billing no , which field shall i put the billing no ?

    REPORT ZTEST_SO_CREATE .
    Order Header
    DATA: HEADER LIKE BAPISDHD1.
    Internal Item Number Assignment
    DATA: L_INA LIKE BAPIFLAG-BAPIFLAG.
    Item Data
    DATA: IT_ITEM LIKE BAPISDITM OCCURS 0 WITH HEADER LINE.
    Document Partner
    DATA: IT_PARTN LIKE BAPIPARNR OCCURS 0 WITH HEADER LINE.
    Schedule Line Data
    DATA: IT_SIN LIKE BAPISCHDL OCCURS 0 WITH HEADER LINE.
    Conditions
    DATA: IT_COND LIKE BAPICOND OCCURS 0 WITH HEADER LINE.
    Configuration: Reference Data
    DATA: IT_CUCFG LIKE BAPICUCFG OCCURS 0 WITH HEADER LINE.
    Configuration: Instances
    DATA: IT_CUINS LIKE BAPICUINS OCCURS 0 WITH HEADER LINE.
    Part_of Entries of Several Configurations
    DATA: IT_CUPRT LIKE BAPICUPRT OCCURS 0 WITH HEADER LINE.
    CU: Reference Order Item / Instance in Configuration
    DATA: IT_CUREF LIKE BAPICUREF OCCURS 0 WITH HEADER LINE.
    Characteristic values of several configurations
    DATA: IT_CUVAL LIKE BAPICUVAL OCCURS 0 WITH HEADER LINE.
    *Number of Generated Document
    DATA: L_SO LIKE BAPIVBELN-VBELN.
    DATA: RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    Header data
      PERFORM SUB_HEADER.
    Internal Item Number Assignment
      L_INA = 'X'.
    Item Data
      PERFORM SUB_ITEM.
    Document Partner
      PERFORM SUB_PARTN.
    Schedule Line Data
      PERFORM SUB_SIN.
    Conditions
      PERFORM SUB_COND.
    Configuration: Reference Data
      PERFORM SUB_CUCFG.
    Configuration: Instances
      PERFORM SUB_CUINS.
    Part_of Entries of Several Configurations
      PERFORM SUB_CUPRT.
    CU: Reference Order Item / Instance in Configuration
      PERFORM SUB_CUREF.
    Characteristic values of several configurations
      PERFORM SUB_CUVAL.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
           EXPORTING
                ORDER_HEADER_IN       = HEADER
                INT_NUMBER_ASSIGNMENT = L_INA
           IMPORTING
                SALESDOCUMENT         = L_SO
           TABLES
                RETURN                = RETURN
                ORDER_ITEMS_IN        = IT_ITEM
                ORDER_PARTNERS        = IT_PARTN
                ORDER_SCHEDULES_IN    = IT_SIN
                ORDER_CONDITIONS_IN   = IT_COND
                ORDER_CFGS_REF        = IT_CUCFG
                ORDER_CFGS_INST       = IT_CUINS
                ORDER_CFGS_PART_OF    = IT_CUPRT
                ORDER_CFGS_VALUE      = IT_CUVAL
                ORDER_CFGS_REFINST    = IT_CUREF.
    Check the
         RETURN TABLE.
    LOOP AT
         RETURN WHERE TYPE = 'E' OR TYPE = 'A'.
       EXIT.
    ENDLOOP.
      LOOP AT RETURN.
    WRITE :/
    RETURN-TYPE,
    RETURN-ID,
    RETURN-NUMBER,
    RETURN-MESSAGE,
    RETURN-LOG_NO,
    RETURN-LOG_MSG_NO,
    RETURN-MESSAGE_V1,
    RETURN-MESSAGE_V2,
    RETURN-MESSAGE_V3,
    RETURN-MESSAGE_V4,
    RETURN-PARAMETER,
    RETURN-ROW,
    RETURN-FIELD,
    RETURN-SYSTEM.
      ENDLOOP.
      IF SY-SUBRC = 0.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', L_SO, ' created'.
      ENDIF.
    *&      Form  SUB_HEADER
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_HEADER.
    Sales document type
      HEADER-DOC_TYPE = 'ZOEM'.
    Sales organization
      HEADER-SALES_ORG = '1000'.
    Distribution channel
      HEADER-DISTR_CHAN = '12'.
    Division
      HEADER-DIVISION = '03'.
    Sales group
      HEADER-SALES_GRP = '001'.
    Sales office
      HEADER-SALES_OFF = '1000'.
    Requested delivery date
      HEADER-REQ_DATE_H = '20070701'.
    HEADER-REQ_DATE_H = SY-DATUM.
    Proposed date type
      HEADER-DATE_TYPE = '1'.
    Customer purchase order date
      HEADER-PURCH_DATE = '20070701'.
    HEADER-PURCH_DATE = SY-DATUM.
    Sales district
      HEADER-SALES_DIST = 'CC'.
    Incoterms (part 1)
      HEADER-INCOTERMS1 = 'EXW'.
    Incoterms (part 2)
      HEADER-INCOTERMS2 = 'XIAMEN'.
    Terms of payment key
      HEADER-PMNTTRMS = '1000'.
    Date for pricing and exchange rate
      HEADER-PRICE_DATE = '20070701'.
    HEADER-PRICE_DATE = SY-DATUM.
    Customer purchase order number
      HEADER-PURCH_NO_C = 'atest'.
    SD document category
      HEADER-SD_DOC_CAT = 'C'.
    Shipping conditions
      HEADER-SHIP_COND = '02'.
    Shipping type
      HEADER-SHIP_TYPE = '07'.
    HEADER-PURCH_NO_S = '1100511'.
    ENDFORM.                    " SUB_HEADER
    *&      Form  SUB_ITEM
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_ITEM.
    Sales document item
      IT_ITEM-ITM_NUMBER = '001000'.
    Higher-level item in bill of material structures
      IT_ITEM-HG_LV_ITEM ='000000'.
    Item Number of the Underlying Purchase Order
      IT_ITEM-PO_ITM_NO = '1000'.
    Material number
      IT_ITEM-MATERIAL = 'VD4'.
      APPEND IT_ITEM.
      IT_ITEM-ITM_NUMBER = '001001'.
      IT_ITEM-HG_LV_ITEM ='001000'.
      IT_ITEM-PO_ITM_NO = '1001'.
      IT_ITEM-MATERIAL = 'CDX8004317R3J'.
    IT_ITEM-CONFIG_ID = '000001'.
    IT_ITEM-INST_ID = '00000001'.
      APPEND IT_ITEM.
    ENDFORM.                    " SUB_ITEM
    *&      Form  SUB_PARTN
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_PARTN.
    Partner function
      IT_PARTN-PARTN_ROLE = 'AP'.
    Customer number
      IT_PARTN-PARTN_NUMB = '0000000090'.
    Item number of the SD document
      IT_PARTN-ITM_NUMBER = '000000'.
      APPEND IT_PARTN.
      IT_PARTN-PARTN_ROLE = 'VE'.
      IT_PARTN-PARTN_NUMB = '0000000107'.
      IT_PARTN-ITM_NUMBER = '000000'.
      APPEND IT_PARTN.
      IT_PARTN-PARTN_ROLE = 'SB'.
      IT_PARTN-PARTN_NUMB = 'OEM'.
      IT_PARTN-ITM_NUMBER = '000000'.
      APPEND IT_PARTN.
      IT_PARTN-PARTN_ROLE = 'AG'.
      IT_PARTN-PARTN_NUMB = '0001100511'.
      IT_PARTN-ITM_NUMBER = '000000'.
      APPEND IT_PARTN.
    ENDFORM.                    " SUB_PARTN
    *&      Form  SUB_SIN
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_SIN.
    Sales document item
      IT_SIN-ITM_NUMBER = '001000'.
    Schedule line
      IT_SIN-SCHED_LINE = '0000'.
    Schedule line date
      IT_SIN-REQ_DATE = '07-01-2007'.
    Date type (day, week, month, interval)
      IT_SIN-DATE_TYPE = '1'.
    Order quantity in sales units
      IT_SIN-REQ_QTY = 5.
      APPEND IT_SIN.
      IT_SIN-ITM_NUMBER = '001001'.
      IT_SIN-SCHED_LINE = '0000'.
      IT_SIN-REQ_DATE = '07-01-2007'.
      IT_SIN-DATE_TYPE = '1'.
      IT_SIN-REQ_QTY = 5.
      APPEND IT_SIN.
    ENDFORM.                    " SUB_SIN
    *&      Form  SUB_COND
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_COND.
    Condition item number
      IT_COND-ITM_NUMBER = '001000'.
    Step number
      IT_COND-COND_ST_NO = '000'.
    Condition counter
      IT_COND-COND_COUNT = '00'.
    Condition type
      IT_COND-COND_TYPE = 'VA00'.
    Condition rate
      IT_COND-COND_VALUE = 1.
    Currency Key
      IT_COND-CURRENCY = 'RMB'.
      APPEND IT_COND.
      IT_COND-ITM_NUMBER = '001000'.
      IT_COND-COND_ST_NO = '000'.
      IT_COND-COND_COUNT = '00'.
      IT_COND-COND_TYPE = 'PR01'.
      IT_COND-COND_VALUE = 1.
      IT_COND-CURRENCY = 'RMB'.
      APPEND IT_COND.
      IT_COND-ITM_NUMBER = '001001'.
      IT_COND-COND_ST_NO = '000'.
      IT_COND-COND_COUNT = '00'.
      IT_COND-COND_TYPE = 'VA00'.
      IT_COND-COND_VALUE = 1.
      IT_COND-CURRENCY = 'RMB'.
      APPEND IT_COND.
      IT_COND-ITM_NUMBER = '001001'.
      IT_COND-COND_ST_NO = '000'.
      IT_COND-COND_COUNT = '00'.
      IT_COND-COND_TYPE = 'PR01'.
      IT_COND-COND_VALUE = 1.
      IT_COND-CURRENCY = 'RMB'.
      APPEND IT_COND.
    ENDFORM.                    " SUB_COND
    *&      Form  SUB_CUCFG
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_CUCFG.
    External item number
      IT_CUCFG-POSEX = '001001'.
    External Configuration ID (Temporary)
      IT_CUCFG-CONFIG_ID = '000001'.
    Instance Number in Configuration
      IT_CUCFG-ROOT_ID = '00000001'.
      APPEND IT_CUCFG.
    ENDFORM.                    " SUB_CUCFG
    *&      Form  SUB_CUINS
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_CUINS.
    External Configuration ID (Temporary)
      IT_CUINS-CONFIG_ID = '000001'.
    Instance Number in Configuration
      IT_CUINS-INST_ID = '00000001'.
    Object type
      IT_CUINS-OBJ_TYPE = 'MARA'.
    Object key
      IT_CUINS-OBJ_KEY = 'D'.
      APPEND IT_CUINS.
      IT_CUINS-CONFIG_ID = '000001'.
      IT_CUINS-INST_ID = '00000002'.
      IT_CUINS-OBJ_TYPE = 'MARA'.
      IT_CUINS-OBJ_KEY = 'D2'.
      APPEND IT_CUINS.
    ENDFORM.                    " SUB_CUINS
    *&      Form  SUB_CUPRT
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_CUPRT.
    External Configuration ID (Temporary)
      IT_CUPRT-CONFIG_ID = '000001'.
    Instance Number in Configuration
      IT_CUPRT-PARENT_ID = '00000001'.
    Instance Number in Configuration
      IT_CUPRT-INST_ID = '00000002'.
    Part_of item number
      IT_CUPRT-PART_OF_NO = '0280'.
    Object type
      IT_CUPRT-OBJ_TYPE = 'MARA'.
    Object key
      IT_CUPRT-OBJ_KEY = 'D2'.
      APPEND IT_CUPRT.
    ENDFORM.                    " SUB_CUPRT
    *&      Form  SUB_CUREF
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_CUREF.
    External item number
      IT_CUREF-POSEX = '001001'.
    External Configuration ID (Temporary)
      IT_CUREF-CONFIG_ID = '000001'.
    Instance Number in Configuration
      IT_CUREF-INST_ID = '00000001'.
      APPEND IT_CUREF.
    ENDFORM.                    " SUB_CUREF
    *&      Form  SUB_CUVAL
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_CUVAL.
    External Configuration ID (Temporary)
      IT_CUVAL-CONFIG_ID = '000001'.
    Instance Number in Configuration
      IT_CUVAL-INST_ID = '00000001'.
    Characteristic name
      IT_CUVAL-CHARC = 'ZS1_LV_HEIGHT'.
    Characteristic Value
      IT_CUVAL-VALUE = '02'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_TOP'.
      IT_CUVAL-VALUE = '04'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_LV_BOTTOM'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_BOTTOM'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_CB_DOOR'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_FIXED_PT'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_EK6'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_EK6_VENDER'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_AUX'.
      IT_CUVAL-VALUE = '02'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_INTERL'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_CA'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_DXN_Q'.
      IT_CUVAL-VALUE = '02'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_CAP_DIV'.
      IT_CUVAL-VALUE = '02'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_PACK'.
      IT_CUVAL-VALUE = '02'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_PAINT'.
      IT_CUVAL-VALUE = '02'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_AUX'.
      IT_CUVAL-VALUE = '02'.
      APPEND IT_CUVAL.
      IT_CUVAL-CONFIG_ID = '000001'.
      IT_CUVAL-INST_ID = '00000001'.
      IT_CUVAL-CHARC = 'ZS1_RECTIFIER'.
      IT_CUVAL-VALUE = '01'.
      APPEND IT_CUVAL.
    ENDFORM.                    " SUB_CUVAL

  • Problem with creating Process order confirmation using BAPI

    Hello,
    While creating Process Order confirmation using BAPI_PROCORDCONF_CREATE_TT, material document is getting created. But a line item is inserted in the table AFRU without material document number. When it is created manually using the transaction COR6, the table is getting updated with material doc in the line item. Can anyone let me know what other attributes to be passed in order the update the same?
    Thanks in Advance.
    Regards, Senthil G.

    Hello , I am working with the same Bapi, can you please send me the code to fill the parameters, if I find the same error like you, I will send you the solution if I correct that.
    Thanks for your help.
    [email protected]
    Guatemala, Cempro ADATSA

  • Create Credit Memo Request based on % discounts of validwith out reference

    Hello Experts,
    Client wants to give credit memo request as 15% discounts on base price sold in the past. This kind of rebate discount is after every 3 months. Client just want to give straight discount instead of Rebate.
    Again credit memo request is prepared without reference to clients sales order. CR should have pricing new procedure condition type which says only 15% discount on ZPR0 base price.
    ZPR0 is Sales org/Dist Channel/Price List/Material.
    I made new % discount condition type in pricing procedure and maintained 15% in vk11
    This discount should take 15% of ZPR0 base price which is also maitained (Yearly changes).
    To fetch ZPR0 should I go for Routine with Base Condition for ABAPer?
    What is best solution you think deem fit. Appreciate your early response.
    Thanks

    Hi P Gomatheeswaran,
    Many thanks for useful tips. I had made discount From 1 only.
    However, I was not getting any Target Quantity. Then I realised that if I go to Item level in Sales tab there is order quantity & then it picked up price instead of 00
    Hi Lakshmipathi,
    Appreciate for very crucial answer of making PR00 as statistical. Thank you once again.
    I have rewarded the points.
    Thread is now closed.
    Rajiv Trivedi
    SAP-SD
    USA

  • Error in Credit Memo Creation using BAPI

    Hi,
    While creating a Credit memo using the BAPI "BAPI_SALESDOCU_CREATEFROMDATA" , the following message is returned: "EVP 113Processing customer 9012041 terminated"
    This occurs only for a particular customer, while for others the BAPI works fine.
    I tried to create a Credit Memo using VA01 for the above customer. The Credit Memo got created there.
    I am not able to find out a reason for the above. Can anyone help me with this.
    Thanks in advance,
    Amit

    Hi,
    Check the dump in SM14 and see where exactly it is throiwng error..Put a break-point before that and then debug the bapi and see if ur missing anything for this customer and what is the difference between this customer and other customer data.
    Regards,
    Nagaraj

  • Problem in creating credit memo

    WHILE CREATING A CREDIT MEMO  its saying
    posting period 001 2008 is not open
    Why its not taking todays date ?

    go to TA: MMPV and for your company code and priod and fiscal year
    and close postings.
    it should work.
    if face problem pls get back to me.
    Regards,
    Nisha
    @award pts if helpful.

Maybe you are looking for

  • Pound sign (#) not supported for automated dial

    Hi, I need to automate calling to IVR systems. I can add arbitrary pause and extension number like: [NSURL URLWithString: @"tel:1112223333,1,1,1234"] The problem is, when I add "#" sign at the end as requested by the IVR, the URL call doesn't work. I

  • Flash Drives and Network Homes

    I have a problem that is driving me nuts. If a kid logs into an OpenDirectory-based network home on an older iMac (white, 2007) and plugs in a flash drive, the drive mounts no problem to their desktop. If the same kid logs into the same account on a

  • ITunes 7 Skipping Issue Fixed - Cross Fade Playback

    Per the prior post by chiefhabeb, if your DMA settings are correct and your still experiencing skipping, do what mponzi suggested, completely disable the "Cross Fade Playback" feature in iTunes. (iTunes/Edit/Preferences/Playback) After updating my au

  • Adobe 10.1.4 crashes when trying to print

    Hello people, I have updated my adobe from 10.1.2 to 10.1.4 yet it still crashes when i try to print. Can anyone help please?

  • Strange behaviours of my Macbook

    Dear users, Strangely I had my system down when I was waking up my pc. After installing the OS X again, I (by mistake) instead of force quitting finder, I pressed CtrlCommandpower (which is for force restart)... the operating system went down and eve