Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI - Sales Order Create

Former Member
0 Likes
4,457

Hello everyone,

I am using  BAPI 'BAPI_SALESORDER_CREATEFROMDAT2' for sales order creation.

I want create a sales order for which Contract start date and Contract end date are required.

My concern is I am not able to find the structure and the field names for these two fields in the BAPI.

I have read the documentation for the BAPI but could not locate these two fileds.

Please advice me as soon as possible.

Awaiting for your response.

- Nikhil.

17 REPLIES 17
Read only

former_member187748
Active Contributor
0 Likes
3,980

Hi Nikhil

please try this if you can get it through

BAPISDHD1-CT_VALID_F and BAPISDHD1-CT_VALID_T.

but i will prefer you to use

BAPI_CUSTOMERCONTRACT_CHANGE.

Read only

0 Likes
3,980

Thanks

My understanding is both are different. Please correct me if I am wrong.

Read only

0 Likes
3,980

Hi Nikhil,

for BAPI_SALESORDER_CREATEFROMDAT2 you have to search on SCN , you will get how to implement it , the field i have suggested shall work in it for Contract Start date and Contract End Date.

Please work on it , i hope you will get what you need.

Read only

former_member214915
Participant
0 Likes
3,980

Hi Nikhil,

                  Fields are present in BAPI  there is structure name as ORDER_HEADER_IN in which you can find the fields name as

CT_VALID_F

CT_VALID_T

Hope this will Help.

Regards

Shahezad

Read only

Former Member
0 Likes
3,980

This message was moderated.

Read only

0 Likes
3,980

Vijay, Mohammad and Sanjeev,

You all suggested the same solution. But it didn't worked.

I tried following,

   wa_head-ct_valid_f  = exl_wa-ct_valid_f .
   wa_head-ct_valid_t  = exl_wa-ct_valid_t .

   wa_headx-ct_valid_f = 'X'.
   wa_headx-ct_valid_t = 'X'.


No luck

Read only

0 Likes
3,980

Hi Nikhil,

please debug your code and see that you are getting values in that fields or not.

Read only

0 Likes
3,980

Hi Nikhil,

It should work.. can you hard code the date and see?? or just put the date in debugger and see whether it is getting reflected...

Read only

0 Likes
3,980

Read only

0 Likes
3,980

Hi Nikhil,

so what is the concern, if you are getting your data in above fields.

Read only

0 Likes
3,980

Read only

0 Likes
3,980

Hi,

did you used the BAPI_TRANSACTION_COMMIT after using this bapi.

Read only

0 Likes
3,980
Read only

0 Likes
3,980

Hi Nikhil,

its common problem with using that bapi, what i will suggest you to first check your data for consistency like data formats you have used in your flat file , and if everything is ok, then search in this forum for any ulternate solution.

Read only

Former Member
0 Likes
3,980

Hi Nikhi,

Check date format and validations for date format.

Thanks

Vijay

Read only

VenkatRamesh_V
Active Contributor
0 Likes
3,980

Hi,

Try tis,

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input  = object
IMPORTING
output = object.



Regards,

Venkat

Read only

Former Member
0 Likes
3,980

Perhaps using function module SD_SALESDOCUMENT_CREATE can be a solution.

Or perhaps try to use a BADI to enforce populating these fields (meaning you have to temporarliy store the input file in a table which you can read in the BADI).