Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3462

To create a Contract using BAPI_CONTRACT_CREATE

$
0
0

Hi ,

 

I am facing an issue while creating a contract using the BAPI BAPI_Contract_Create.

I am calling the BAPI in the report . I am getting the error messages.

 

1. Vendor   has not been created for purch. organization .- Message id: 06 , number 027

2.  No master record exists for vendor  - Message id 06 , number 101

3. The material does not exist or is not activated.- message M3 , number 305.

 

The vendor does exist in the purchase organisation and the material is also active.

When I ran the BAPI in standalone mode with the same parameters , I do not get any error.

 

I am populating the  following parametersa in header and the item details and passing to the BAPI as shown below..

 

LOOP AT t_file_data1 INTO wa_file_data1.

 

CASE wa_file_data1-row.

 

WHEN '0001'.

 

CASE wa_file_data1-col.

 

WHEN '0001'.

 

w_header1-comp_code = wa_file_data1-value.

 

w_headerx1-comp_code = 'X'.

 

WHEN '0002'.

 

w_header1-doc_type = wa_file_data1-value.

 

w_headerx1-doc_type = 'X'.

 

WHEN '0003'.

 

w_header1-creat_date = wa_file_data1-value.

 

w_headerx1-creat_date = 'X'.

 

WHEN '0004'.

 

w_header1-vendor = wa_file_data1-value.

 

w_headerx1-vendor = 'X'.

 

  

 

WHEN '0005'.

 

w_header1-purch_org = wa_file_data1-value.

 

w_headerx1-purch_org = 'X'.

 

  

 

WHEN '0006'.

 

w_header1-pur_group = wa_file_data1-value.

 

w_headerx1-pur_group = 'X'.

 

WHEN '0007'.

 

w_header1-currency = wa_file_data1-value.

 

w_headerx1-currency = 'X'.

 

WHEN '0008'.

 

w_header1-vper_start = wa_file_data1-value.

 

w_headerx1-vper_start = 'X'.

 

WHEN '0009'.

 

w_header1-vper_end = wa_file_data1-value.

 

w_headerx1-vper_end = 'X'.

 

  

 

ENDCASE.

 

  

 

WHEN OTHERS.

 

CASE wa_file_data1-col.

 

WHEN '0001'.

 

w_item1-item_no = wa_file_data1-value.

 

w_itemx1-item_no = wa_file_data1-value.

 

w_itemx1-item_nox = 'X'.

 

WHEN '0002'.

 

w_item1-short_text = wa_file_data1-value.

 

w_itemx1-short_text = 'X'.

 

WHEN '0003'.

 

w_item1-material = wa_file_data1-value.

 

w_itemx1-material = 'X'.

 

WHEN '0004'.

 

w_item1-plant = wa_file_data1-value.

 

w_itemx1-plant = 'X'.

 

WHEN '0005'.

 

w_item1-matl_group = wa_file_data1-value.

 

w_itemx1-matl_group = 'X'.

 

WHEN '0006'.

 

w_item1-target_qty = wa_file_data1-value.

 

w_itemx1-target_qty = 'X'.

 

  

 

WHEN '0007'.

 

w_item1-orderpr_un = wa_file_data1-value.

 

w_itemx1-orderpr_un = 'X'.

 

WHEN '0008'.

 

w_item1-conv_num1 = wa_file_data1-value.

 

w_itemx1-conv_num1 = 'X'.

 

  

 

WHEN '0009'.

 

w_item1-conv_den1 = wa_file_data1-value.

 

w_itemx1-conv_den1 = 'X'.

 

  

 

WHEN '0010'.

 

w_item1-net_price = wa_file_data1-value.

 

w_itemx1-net_price = 'X'.

 

WHEN '0011'.

 

w_item1-price_unit = wa_file_data1-value.

 

w_itemx1-price_unit = 'X'.

 

ENDCASE.

 

ENDCASE.

 

IF wa_file_data1-row NE '0001'.

 

AT END OF row.

 

APPEND w_item1 TO t_item1.

 

APPEND w_itemx1 TO t_itemx1.

 

ENDAT.

 

ENDIF.

 

Hope I am clear. Any further information will be provided  we are in releaseSAP_APPL 600 This is a bit urgent . Points will be rewarded .

 

 

Thanks

Sathya


Viewing all articles
Browse latest Browse all 3462

Trending Articles