Application Development 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: 

BAPI for Sales Order and DR.....

Former Member
0 Kudos

Hi experts!

Is there any bapi for sales order and DR creation? i hope u guys help me..tnx! Reward points wil be given to deserve answer.

Regards,

Mackoy

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Sales Order related BAPI's

BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data

BAPI_ORDER_CHANGE_STATUS_GET Change status for order

BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document

BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order

BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance

BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer

BAPI_SALESORDER_GETSTATUS Sales order: Display status

BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order

BAPI_XSI_GET_VTRK_G Tracking info

and Delivery BAPIs

BAPI_IBDLV_CREATE_FROM_OBDLV BAPI Inbound Delivery from Outbound Delivery

BAPI_INB_DELIVERY_CONFIRM_DEC BAPI for Inbound Delivery Confirmation from a Decentralized System

BAPI_INB_DELIVERY_SAVEREPLICA BAPI Function Module for Replication of Inbound Deliveries

BAPI_OUTB_DELIVERY_CONFIRM_DEC BAPI for Outbound Delivery Confirmation from a Decentralized System

BAPI_OUTB_DELIVERY_SAVEREPLICA BAPI Function Module for Replication of Outbound Deliveries

<b>for future reference make note of the link for ant BAPI requirements--

http://www.sapbapi.com/bapi-list/</b>;

regards,

srinivas

<b>*reward for useful answers*</b>

11 REPLIES 11

former_member181962
Active Contributor
0 Kudos

YOu can use the bapi BAPI_SALESORDER_CREATEFROMDAT2 for SO creation?

What do you mean by DR?

0 Kudos

Hi Ravi,

DR means Delivery receipt, if im not mistaken...

Regards,

Mackoy

0 Kudos

Hi Ravi,

actually, it is short for outbound delivery...

Tnx!

Regards,

Mackoy

0 Kudos

Hi,

check these for creation of Outbound Deliveries,

BAPI_OUTB_DELIVERY_CREATENOREF: Generates Delivery Without Reference

BAPI_OUTB_DELIVERY_CREATE_SLS: Generates Delivery for Customer Order

BAPI_OUTB_DELIVERY_CREATE_STO: Generates Delivery for Stock Transport Order

<b>

Reward points if this helps,</b>

Kiran

0 Kudos

Hi,

For out bound delivery you can use BAPI_DELIVERYPROCESSING_EXEC

<b>Reward points</b>

Regards

Former Member
0 Kudos

Hi,

Try with this bapi..if it works out..BAPI_SALESDOCU_CREATEFROMDATA.

Otherwise try with the following bapis..

BAPI_SALESORDER_CREATEFROMDAT2

BAPI_SALESORDER_CREATEFROMDAT3.

Regards,

Omkar.

Former Member
0 Kudos

Hi,

try with the following bapis..

BAPI_SALESORDER_CREATEFROMDAT2

BAPI_SALESORDER_CREATEFROMDAT3.

<b>Reward points</b>

Regards

former_member235056
Active Contributor
0 Kudos

Hi,

Its the link 4 all those who want to search for different bapis:

<a href="http://www.planetsap.com/LIST_ALL_BAPIs.htm">http://www.planetsap.com/LIST_ALL_BAPIs.htm</a>

Pls do reward all helpful points.

Regards,

Ameet

Former Member
0 Kudos

Hi,

Use BAPI : BAPI_SALESORDER_CREATEFROMDAT2

follow this sample code...

REPORT ZZBAPI_TEST1 .

*===========================================================

      • Start of selection

*===========================================================

START-OF-SELECTION.

* test of sales order with BAPI
PERFORM SALES_ORDER_BAPI.
 
 
*================ End of main program ======================
 
*&---------------------------------------------------------------------*
*& Form SALES_ORDER_BAPI
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM SALES_ORDER_BAPI.
DATA : SD_HEADER LIKE BAPISDHEAD.
 
DATA : BEGIN OF ITEMIN_IT OCCURS 1.
INCLUDE STRUCTURE BAPIITEMIN.
DATA : END OF ITEMIN_IT.
 
DATA : BEGIN OF PARTNR_IT OCCURS 1.
INCLUDE STRUCTURE BAPIPARTNR.
DATA : END OF PARTNR_IT.
 
DATA : WK_SD_DOCNO LIKE VBAK-VBELN.
 
DATA: WK_RETURN LIKE BAPIRETURN.
 
CLEAR : SD_HEADER , ITEMIN_IT , PARTNR_IT.
 
SD_HEADER-DOC_TYPE = 'TA'.
SD_HEADER-SALES_ORG = '1793'.
SD_HEADER-DISTR_CHAN = '01'.
SD_HEADER-DIVISION = '01'.
SD_HEADER-PURCH_NO = 'Test'.
 
* itemin_it-hg_lv_item = '10'.
ITEMIN_IT-MATERIAL = '000000000000001143'.
ITEMIN_IT-PLANT = '3018'.
ITEMIN_IT-REQ_QTY = '1'.
ITEMIN_IT-SALES_UNIT = 'CS'.
APPEND ITEMIN_IT.
 
* itemin_it-hg_lv_item = '20'.
ITEMIN_IT-MATERIAL = '000000000000000848'.
ITEMIN_IT-PLANT = '3018'.
ITEMIN_IT-REQ_QTY = '1'.
ITEMIN_IT-SALES_UNIT = 'KG'.
APPEND ITEMIN_IT.
 
* itemin_it-hg_lv_item = '30'.
ITEMIN_IT-MATERIAL = '000000000000000848'.
ITEMIN_IT-PLANT = '3018'.
ITEMIN_IT-REQ_QTY = '1'.
ITEMIN_IT-SALES_UNIT = 'EA'.
APPEND ITEMIN_IT.
 
 
LOOP AT ITEMIN_IT.
WRITE : / SY-TABIX , ITEMIN_IT-MATERIAL , ITEMIN_IT-PLANT
, ITEMIN_IT-REQ_QTY , ITEMIN_IT-SALES_UNIT.
ENDLOOP.
 
 
CLEAR : PARTNR_IT.
PARTNR_IT-PARTN_ROLE = TEXT-001.
PARTNR_IT-PARTN_NUMB = '0000000004'.
APPEND PARTNR_IT.
CLEAR : PARTNR_IT.
 
PARTNR_IT-PARTN_ROLE = 'WE'.
PARTNR_IT-PARTN_NUMB = '0000000051'.
APPEND PARTNR_IT.
 
LOOP AT PARTNR_IT.
WRITE : / SY-TABIX , PARTNR_IT-PARTN_ROLE , PARTNR_IT-PARTN_NUMB.
ENDLOOP.
 
CLEAR : ITEMIN_IT , PARTNR_IT , WK_RETURN..
 
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDATA'
EXPORTING
ORDER_HEADER_IN = SD_HEADER
IMPORTING
SALESDOCUMENT = WK_SD_DOCNO
* SOLD_TO_PARTY =
* SHIP_TO_PARTY =
* BILLING_PARTY =
RETURN = WK_RETURN
TABLES
ORDER_ITEMS_IN = ITEMIN_IT
ORDER_PARTNERS = PARTNR_IT
* ORDER_ITEMS_OUT =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CCARD =
EXCEPTIONS
OTHERS = 1.
 
WRITE : / 'sy-subrc = ' , SY-SUBRC.
 
IF NOT WK_SD_DOCNO IS INITIAL.
WRITE : / WK_SD_DOCNO , 'registerd'.
ELSE.
WRITE : / 'incorrect'.
WRITE : / WK_RETURN-TYPE , WK_RETURN-CODE , WK_RETURN-MESSAGE.
WRITE : / WK_RETURN-LOG_NO, WK_RETURN-LOG_MSG_NO,
WK_RETURN-MESSAGE_V1.
ENDIF.
 
ENDFORM. " SALES_ORDER_BAPI

regards,

Ashok Reddy

Former Member
0 Kudos

Sales Order related BAPI's

BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data

BAPI_ORDER_CHANGE_STATUS_GET Change status for order

BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document

BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order

BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance

BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer

BAPI_SALESORDER_GETSTATUS Sales order: Display status

BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order

BAPI_XSI_GET_VTRK_G Tracking info

and Delivery BAPIs

BAPI_IBDLV_CREATE_FROM_OBDLV BAPI Inbound Delivery from Outbound Delivery

BAPI_INB_DELIVERY_CONFIRM_DEC BAPI for Inbound Delivery Confirmation from a Decentralized System

BAPI_INB_DELIVERY_SAVEREPLICA BAPI Function Module for Replication of Inbound Deliveries

BAPI_OUTB_DELIVERY_CONFIRM_DEC BAPI for Outbound Delivery Confirmation from a Decentralized System

BAPI_OUTB_DELIVERY_SAVEREPLICA BAPI Function Module for Replication of Outbound Deliveries

<b>for future reference make note of the link for ant BAPI requirements--

http://www.sapbapi.com/bapi-list/</b>;

regards,

srinivas

<b>*reward for useful answers*</b>

Former Member
0 Kudos

Hi all,

tnx guys for the help! problem solved.

Mackoy