Skip to Content
author's profile photo Former Member
Former Member

how to use the field checkbox for bapi parameter ?

Dear All,

Now, i find some code as below.

The BAPI is uesd to create or update the sales order; but checkbox for bapi parameter have not been give values 'X'. why?

take the first bapi for example, i think table order_items_inx (table parameter) should be given value 'X' for the field which will be update.

Could you teach what happed?

...........................

case gt_all_hd-sd_doc_cat.

when 'C'.

call function 'BAPI_SALESORDER_CREATEFROMDAT2'

exporting

order_header_in = gs_order_hd

importing

salesdocument = gv_vbeln

tables

return = gt_return

order_items_in = gt_items

order_partners = gt_partners

order_schedules_in = gt_schedules

order_conditions_in = gt_conditions.

when others.

call function 'BAPI_SALESDOCU_CREATEFROMDATA1'

exporting

sales_header_in = gs_order_hd1

importing

salesdocument_ex = gv_vbeln

tables

return = gt_return

sales_items_in = gt_item1

sales_partners = gt_part1

sales_schedules_in = gt_sch1

sales_conditions_in = gt_cond1.

endcase.

....................

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 09:54 AM

    If you want to change a value, you need to pass the value in the 'order_items_in = gt_items' structure.

    You also need to add an 'X' in the 'order_items_inx = gt_itemsx' structure for the same field.

    If you do not pass the 'X' then the value will not be updated...

    It looks like you are not passing the required '...x' structures.

    For more info see the documentation:

    Notes                                                                                
    1.  Mandatory entries:                                                                                
    ORDER_HEADER_IN : DOC_TYPE     Sales document type                       
                        SALES_ORG    Sales organization                        
                        DISTR_CHAN   Distribution channel                      
                        DIVISION     Division                                                                                
    ORDER_PARTNERS..: PARTN_ROLE   Partner role, SP sold-to party            
                        PARTN_NUMB   Customer number                                                                                
    ORDER_ITEMS_IN..: MATERIAL     Material number                                                                                
    2.  Ship-to party:                                                                                
    If no ship-to party is entered, use the following: Ship-to party =   
          sold-to party.                                                                                
    3.  Commit control:                                                      
          The BAPI does not have a database commit. This means that the        
          relevant application must leave the commit, in order that can be     
          carried out on on the database. The BAPI BAPI_TRANSACTION_COMMIT is  
          available for this.                                                                                
    4.  German key words:                                                    
          The following key words must be entered in German, independantly of  
          the logon language:                                                  
          DOC_TYPE     Sales document type, for example: TA for standard order 
          PARTN_ROLE   Partner role, for example: WE for ship-to party                                                                                
    Further information                                                                                
    You can find further information in the OSS. The note 93091 contains     
      general information on the BAPIs in SD.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 03:51 AM

    thank you!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.