Skip to Content

BAPI - Custom fields

Hi Guys:

I would like to use the BAPI of Sales order <b>BAPI_SALESORDER_CREATEFROMDAT2</b> and have small doubt in my mind. Already some Custom fields are added in the Sales Order item Level Additional <b>TabA and TabB</b>. How can i simulate the Custom fields to above mentioned BAPI. Is Userexit will solve the purpose of mine?

Suggestions are welcome.

Thanks in Advance


Suresh Babu Karanam

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2005 at 12:36 PM

    Hi Suresh,

    In the BAPI there is a table parameter EXTENSIONIN which you can use to pass the values for user defined fields to the BAPI..

    For this first you will need to add these custom fields to the structure BAPE_VBAK or BAPE_VBAP or BAPE_VBEP etc.. depending on the table you have extended.. Then in the EXTENSIONIN table structure you'll need to specify the above structure name in the field EXTENSIONIN-STRUCTURE and the value of the fields added to the BAPE_VBAK or BAPE_VBAP or BAPE_VBEP structure in the field EXTENSIONIN-VALUEPART1.. The data in the field VALUEPART1 appears as a continuous string therefore the sequence and positioning of the values in this field for the custom fields you have added has to be correct. For eg. if the first field that you have added to the structure is of length 10 and the second field is of length 5 then the value for the first field will occupy the position 1 to 10 in the VALUEPART1 field and the second field value has to start from position 11 irrespective of the actual length of the value of the first field...

    You can get more documentation on this in the documentation of the BAPI_SALESORDER_CREATEFROMDAT2 for the parameter EXTENSIONIN.. You can also check the documentation for the BAPI BAPI_MATERIAL_SAVEDATA for more clarity as the concept of passing values for custom fields to a BAPI ,if the EXTENSIONIN table parameter is provided, is the same with some minor differences..

    Hope this helps you resolve you issue.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 02, 2005 at 01:46 PM

    Thank you very much Netesh I will give points for your valuble information. I have just started the code on my requirement. Even i red the OSS note for this Custum fields in the SD-BAPI. They clearly specify that custum fields should only <b>char</b>. But i would like use <b>Curr</b> fields. Can i convert <b>Curr to Char?</b>.


    Suresh Babu Karanam

    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.