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_REQUISITION_CREATE : how to populate data for sevices tab

Former Member
0 Likes
4,749

Hi all,

I am creating a purchase requisition through bapi .I am using bapi BAPI_REQUISITION_CREATE

For creating purchase requisition. The bapi is creating PR.

I need to add item level services details also through bapi.i am Using structure BAPIESLLC to populate data. But the data is not getting populated in the services tab.

For header data i am populating the following data.

itab_bapiebanc-preq_item = '10'.

itab_bapiebanc-doc_type = 'NB'.

itab_bapiebanc-short_text = 'Blinding'.

itab_bapiebanc-quantity = '1'.

itab_bapiebanc-unit = 'AU'.

itab_bapiebanc-deliv_date = '20081027'.

itab_bapiebanc-plant = '1000'.

itab_bapiebanc-pur_group = '001'.

itab_bapiebanc-preq_name = 'tracking no'.

itab_bapiebanc-trackingno = '2/C/1B'.

itab_bapiebanc-mat_grp = '007'.

itab_bapiebanc-acctasscat = 'P'.

itab_bapiebanc-ITEM_CAT = '9'.

itab_bapiebanc-GR_IND = 'X'.

itab_bapiebanc-IR_IND = 'X'.

itab_bapiebanc-FIXED_VEND = ' '.

APPEND itab_bapiebanc.

itab_bapiebkn-wbs_elem = 'E-2004'.

itab_bapiebkn-g_l_acct = '0000417000'.

APPEND itab_bapiebkn.

itab_bapiebantx-PREQ_ITEM = '10'.

APPEND itab_bapiebantx.

when i am adding the above data the p,r is creating sucessfully in the system.

I need to add data in the item level services tab also.

I am populating for services tab .

*----- this part is not working

itab_bapiservices-SERVICE = '100217'.

itab_bapiservices-PCKG_NO = '0000000001'.

itab_bapiservices-LINE_NO = '0000000001'.

itab_bapiservices-EXT_LINE = '0000000010'.

itab_bapiservices-short_text = 'BREAKFAST CNTR TOP; AS PER SPECS'.

itab_bapiservices-QUANTITY = '680'.

itab_bapiservices-BASE_UOM = 'M2'.

itab_bapiservices-GR_PRICE = '23.00'.

itab_bapiservices-MATL_GROUP = '007'.

itab_bapiservices-PRICE_UNIT = '1'.

append itab_bapiservices.

I am populating data for service tab like given above.But the value is not get updaing in purchase requisation.

Please let me know how to populate the data for service tab.

with regards,

ambrose

itab_bapiebantx-text_line = 'Test for Purchase requisiton'.

APPEND itab_bapiebantx.

Hi all,

I am creating a purchase requisition through bapi .I am using bapi BAPI_REQUISITION_CREATE

For creating purchase requisition. The bapi is creating PR.

I need to add item level services details also through bapi.i am Using structure BAPIESLLC to populate data. But the data is not getting populated in the services tab.

For header data i am populating the following data.

itab_bapiebanc-preq_item = '10'.

itab_bapiebanc-doc_type = 'NB'.

itab_bapiebanc-short_text = 'Blinding'.

itab_bapiebanc-quantity = '1'.

itab_bapiebanc-unit = 'AU'.

itab_bapiebanc-deliv_date = '20081027'.

itab_bapiebanc-plant = '1000'.

itab_bapiebanc-pur_group = '001'.

itab_bapiebanc-preq_name = 'tracking no'.

itab_bapiebanc-trackingno = '2/C/1B'.

itab_bapiebanc-mat_grp = '007'.

itab_bapiebanc-acctasscat = 'P'.

itab_bapiebanc-ITEM_CAT = '9'.

itab_bapiebanc-GR_IND = 'X'.

itab_bapiebanc-IR_IND = 'X'.

itab_bapiebanc-FIXED_VEND = ' '.

APPEND itab_bapiebanc.

itab_bapiebkn-wbs_elem = 'E-2004'.

itab_bapiebkn-g_l_acct = '0000417000'.

APPEND itab_bapiebkn.

itab_bapiebantx-PREQ_ITEM = '10'.

APPEND itab_bapiebantx.

when i am adding the above data the p,r is creating sucessfully in the system.

I need to add data in the item level services tab also.

I am populating for services tab .

*----- this part is not working

itab_bapiservices-SERVICE = '100217'.

itab_bapiservices-PCKG_NO = '0000000001'.

itab_bapiservices-LINE_NO = '0000000001'.

itab_bapiservices-EXT_LINE = '0000000010'.

itab_bapiservices-short_text = 'BREAKFAST CNTR TOP; AS PER SPECS'.

itab_bapiservices-QUANTITY = '680'.

itab_bapiservices-BASE_UOM = 'M2'.

itab_bapiservices-GR_PRICE = '23.00'.

itab_bapiservices-MATL_GROUP = '007'.

itab_bapiservices-PRICE_UNIT = '1'.

append itab_bapiservices.

I am populating data for service tab like given above.But the value is not get updaing in purchase requisation.

Please let me know how to populate the data for service tab.

with regards,

ambrose

itab_bapiebantx-text_line = 'Test for Purchase requisiton'.

APPEND itab_bapiebantx.

6 REPLIES 6
Read only

Former Member
0 Likes
1,992

Hello

Try this:


    CALL FUNCTION 'NUMBER_GET_NEXT' 
         EXPORTING 
           nr_range_nr                   = '01' 
           object                        = 'SERVICE' 
         IMPORTING 
           NUMBER                        = pacno 
         EXCEPTIONS 
           INTERVAL_NOT_FOUND            = 1 
           OTHERS                        = 8. 
itab_bapiservices-PCKG_NO = pacno + 1.

Also Note 499626 - FAQ: BAPIs in the service

Read only

0 Likes
1,992

hope this help me .

Edited by: ambrose mohandoss on Oct 27, 2008 12:14 PM

Read only

0 Likes
1,992

Hi ALL,

if i populate data as per sap notes it is running in indefinite loop.Can any one please give me the details how to pass data to services structure in bapi.

ambrose

Read only

0 Likes
1,992

Hello

Regrettably little used this function.

Run FM 'BAPI_REQUISITION_GETDETAIL' with order created manually and see as there parameters are filled.

And else...

As far as I know that package of the services must terminate the empty line without number facilities.

Read only

0 Likes
1,992

Yes this is working fine. Use bapi BAPI_REQUISITION_GETDETAIL to get the patern of services how it is populated in table .Follow the same patern and pass it to bapi BAPI_REQUISITION_CREATE .This will create purchase requisation with services.

Read only

Former Member
0 Likes
1,992