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: 

What's the name of FM for getting Sales Order Header / Item Status info

Former Member
0 Kudos

Hello All:

Do you know what's the name of Function Module for getting Sales Order Header / Item Status Overview ? Any sample code will be very much appreciated.

Basically, I am trying to create a Webpage where user can enter the Sales Order document number and will return the Sales Order: Status Overview.

Thanks,

Dipankar Biswas

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can find a lot by searching yourself. See if BAPI_SALESORDER_GETSTATUS is what you need.

Rob

6 REPLIES 6

Former Member
0 Kudos

You can find a lot by searching yourself. See if BAPI_SALESORDER_GETSTATUS is what you need.

Rob

Former Member
0 Kudos

Try this Function Modules :

BAPI_SALESORDER_GETSTATUS

MD_SALES_ORDER_STATUS_REPORT

Former Member
0 Kudos

Hi Dipankar.,

use this BAPI "BAPI_SALESORDER_GETLIST"

Former Member
0 Kudos

use bapi

BAPI_SALESORDER_GETSTATUS

Regards,

Alpesh

0 Kudos

Thanks everybody ! Appreciate for your prompt response. I was also looking for some sample code, and I did find some on. And here is one. I still have to try the code, but here is for all your reference:


*&---------------------------------------------------------------------*
*& Report ZBAPI_SALESORDER_GETSTATUS *
*& *
*&---------------------------------------------------------------------*
*& Read and Display the Sales Order Items and Status of the Order *
*& *
*&---------------------------------------------------------------------*

REPORT zbapi_salesorder_getstatus NO STANDARD PAGE HEADING LINE-SIZE 200 LINE-COUNT 33(3).

TABLES: vbap. "Sales Document Item Data.

DATA: wa_bapireturn TYPE bapireturn,
wa_bapisdstat TYPE bapisdstat,
it_bapisdstat LIKE STANDARD TABLE OF wa_bapisdstat.

TYPES: BEGIN OF ty_mat_name,
matnr TYPE makt-matnr,
maktx TYPE makt-maktx,
END OF ty_mat_name.

DATA: wa_mat_name TYPE ty_mat_name,
it_mat_name LIKE TABLE OF wa_mat_name WITH KEY matnr .

PARAMETERS: p_vbeln LIKE vbap-vbeln DEFAULT 5573.

START-OF-SELECTION.

SELECT matnr maktx FROM makt INTO TABLE it_mat_name.


CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
EXPORTING
salesdocument = p_vbeln
IMPORTING
return = wa_bapireturn
TABLES
statusinfo = it_bapisdstat.



IF wa_bapireturn IS INITIAL. " Successful Execution.
WRITE: / 'Document No: ' COLOR 1, 20 'PO Number : ', 40 'Status' , 50 'Delv.Stat',60 'Item No', 80 'Material', 90 'Material Description', 130 'Net Price' COLOR 2.
ULINE.


LOOP AT it_bapisdstat INTO wa_bapisdstat.

WRITE: / wa_bapisdstat-doc_number. " Sales Document Number.

READ TABLE it_mat_name INTO wa_mat_name WITH KEY matnr = wa_bapisdstat-material.

WRITE: /20 wa_bapisdstat-purch_no, " Customer Purchase Order Number
40 wa_bapisdstat-prc_stat_h, " Processing Status
50 wa_bapisdstat-dlv_stat_h, " Delivery Status
60 wa_bapisdstat-itm_number, " Item Number
80 wa_bapisdstat-material, " Material
90 wa_mat_name-maktx, " Material Description
130(10) wa_bapisdstat-net_price. " Net Price
CLEAR wa_bapisdstat.
ENDLOOP.
REFRESH it_bapisdstat[].
ELSE.
WRITE: wa_bapireturn-message.
ENDIF.

Former Member
0 Kudos

Keep up the good work guys !