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 : BAPI_CONTRACT_CREATE problem for conditions upload

Former Member
0 Likes
2,787

Dear ABAP Expert,

I have a problem in uploading purchase contract ; conditions are not getting uploaded in Contract.

Below is the BAPI ABAP code , Below code Sucessfully create purchasing document no. but failed to Upload Condition details.

CALL FUNCTION 'BAPI_CONTRACT_CREATE'
        EXPORTING
          header              = gwa_header
          headerx             = gwa_headerx
        IMPORTING
          purchasingdocument  = g_bpo_no
        TABLES
          return              = git_return
          item                = git_item
          itemx               = git_itemx
          item_cond_validity  = git_cond_val
          item_cond_validityx = git_cond_valx
          item_condition      = git_cond
          item_conditionx     = git_condx.

Below is the table values filled for 'git_cond_val' and 'git_cond'

      ADD 1 TO l_serial_id.
       lwa_cond-item_no        =   l_item_no.  " Actual Item line no
       lwa_cond-cond_count      =   l_serial_id. "Incremental line no for each item start with 01
       lwa_cond-cond_type      =   gwa_table-cond_type.
       lwa_cond-scale_type     =   'A'.
       lwa_cond-cond_value     =   gwa_table-cond_value.
       lwa_cond-CURRENCY       =   'INR'.
       lwa_cond-change_id      =    'I'.
       lwa_condx-item_no        =   l_item_no.
       lwa_condx-cond_count     =   l_serial_id.
       lwa_condx-cond_type      =    'X'.
       lwa_condx-scale_type     =    'X'.
       lwa_condx-cond_value     =    'X'.
       lwa_condX-CURRENCY       =    'X'.
       APPEND :     lwa_cond TO git_cond,
                            lwa_condx TO git_condx.

Please help in case something is required to activate or to insert contract conditions.

Regards

Vaman Kamat

10 REPLIES 10
Read only

madhu_vadlamani
Active Contributor
0 Likes
1,584

Hi,

Why changing parameters also passing?.Did you check with lsmw bapi or idoc method.

Regards,

Madhu.

Read only

0 Likes
1,584

Dear Madhu,

My main focus is on BAPI . please help me to resolve BAPI issue.

Regards

Vaman Kamat

Read only

0 Likes
1,584

Hi Vaman,

Try passing the data to ITEM_COND_VALIDITY. You need to pass the line item number and validity period for the line item conditions. This table sets the validity period for the conditions, Hope this helps.

Cheers

~Niranjan

Read only

0 Likes
1,584

Hi,

Please check this note:1361019

Regards,

Madhu.

Read only

0 Likes
1,584

Thanks Niranjan,

I have already pass  'ITEM_COND_VALIDITY' values, it create Contract no but unable to create conditions.

Read only

Former Member
0 Likes
1,584

Issue not yet resolved. please help.

Read only

0 Likes
1,584

Hi Vaman,

Please check this thread.Are you able to create manually. http://scn.sap.com/message/3747377#3747377

use this BAPI_CONTRACT_GETDETAIL and check how it is giving the data.

Regards,

Madhu.

Read only

0 Likes
1,584

Hi,

Did you check the above sap note.

Regards,

Madhu.

Read only

Former Member
0 Likes
1,584

Hi,

Please let me know if you have been able to solve the issue. I am also facing the same issue .

Regards,

Nandini

Read only

Former Member
0 Likes
1,584

This message was moderated.