Skip to Content
0
Former Member
Jun 19, 2006 at 03:17 PM

help needed in bapi _requistion _create

44 Views

Hi all,

I want to assign a delivery address and unloading point to a purchase requistion i got the delvery address but iam not able to figure out the unloading point.

I want you guys to let me know from which table i have to retrieve the unloading point and assign to which part of BAPI.

Iam sending my code please take a look at it and let me know if iam wrong any where and what i need to add for unloading point.

data: begin of itab_bapiebkn occurs 100.

include structure bapiebkn.

data: end of itab_bapiebkn.

data : I_BAPIMERQADDRDELIVERY TYPE TABLE OF BAPIMERQADDRDELIVERY,

W_BAPIMERQADDRDELIVERY TYPE BAPIMERQADDRDELIVERY.

w_quantity = itab-multiple * itab-bstrf.

w_item_no = w_item_no + 1.

itab_bapiebanc-preq_item = w_item_no.

itab_bapiebanc-doc_type = c_doc_type.

itab_bapiebanc-created_by = sy-uname.

itab_bapiebanc-material = itab-matnr.

itab_bapiebanc-plant = itab-werks.

itab_bapiebanc-quantity = w_quantity.

itab_bapiebanc-deliv_date = sy-datum + 1.

itab_bapiebanc-trackingno = w_bednr.

append itab_bapiebanc.

w_bapimerqaddrdelivery-PREQ_ITEM = w_item_no.

IF S_GROUP = '2'.

SELECT SINGLE * FROM TVARV WHERE NAME EQ 'ZGRP1'.

IF SY-SUBRC EQ 0.

SELECT SINGLE ADDRNUMBER FROM ADRC INTO w_bapimerqaddrdelivery-ADDR_NO

WHERE ADDRNUMBER = TVARV-LOW.

ENDIF.

Thanks in advance

Suchitra