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_CONTRACT_CREATE : Agreement date

Former Member
0 Likes
1,447

Hi,

I'm using this fm in order to create contract. I filled BAPI parameter like this:

Header-creat_date = 2008.07.20

It should normally fill the agreement date in ME31K but when I take a look after executing BAPI, this date is always sy-datum.

Can anyone explain me why or tell me how/where to fill this agreement date in the BAPI?

Points will surely be awarded!

Tarick.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,168

Hi Vinod,

Thx again!

I forgot to mention one thing!

Actually the date is uploaded from EXCEL file into an internal table and then filled inside BAPI in order to create the contract.

So if I use SHD0, how would I be able to fill the Agreement date through BAPI?

By using SHD0, can I avoid having sy-datum and get the value filled in BAPI?

Tarick.

5 REPLIES 5
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,168

Hi,

ME31K is create contract. When u call/open this transaction it will populate the aggreement date as current date by default. If u want to change it then create one transaction variant for this using transaction SHD0 and u can assign default values for these fields here.

Also check the contract that got created by ur BAPI in ME33K (Not ME31K) for checking whether it is populating correct dates or not..

Thanks,

Vinod.

Read only

Former Member
0 Likes
1,168

Hi again,

Thanks for ur answer!

Actually I need to delete this default value (sy-datum) and fill it with a date I put in BAPI. Since the BAPI is not doing it, can I do this by SHD0??

Tarick.

Read only

0 Likes
1,167

Hi,

yes u can achieve this.

Check below link on how to create transaction variant.

Thanks,

Vinod.

Read only

Former Member
0 Likes
1,169

Hi Vinod,

Thx again!

I forgot to mention one thing!

Actually the date is uploaded from EXCEL file into an internal table and then filled inside BAPI in order to create the contract.

So if I use SHD0, how would I be able to fill the Agreement date through BAPI?

By using SHD0, can I avoid having sy-datum and get the value filled in BAPI?

Tarick.

Read only

0 Likes
1,167

Hi,

If u r using BAPI then why are u worrying about default date that is being populated in transaction. BAPI will not call this transaction. If u pass correct data to BAPI it will update the same in data base. Check this by executing the BAPI. No need to consider SHD0. This is only related to transaction. Nothing to do with BAPI.

Thanks,

Vinod.