06-03-2009 10:08 PM
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
06-03-2009 10:11 PM
You can find a lot by searching yourself. See if BAPI_SALESORDER_GETSTATUS is what you need.
Rob
06-03-2009 10:11 PM
You can find a lot by searching yourself. See if BAPI_SALESORDER_GETSTATUS is what you need.
Rob
06-04-2009 4:35 AM
Try this Function Modules :
BAPI_SALESORDER_GETSTATUS
MD_SALES_ORDER_STATUS_REPORT
06-04-2009 4:52 AM
06-04-2009 4:57 AM
06-04-2009 5:49 PM
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.
06-04-2009 5:50 PM