03-21-2011 12:19 PM
I ve passed matrrial range & production plant range to bapi
BAPI_PRODORD_GET_LIST. But when we only pass production plant range it is fine but when i pass material range it gives dump as
INPUT PLANT MC01 & MATERIAL - 05 54 306 300 to 05 54 306 500
dumps -
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLMGV_BAPIALE" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
You attempted to access an unassigned field symbol
(data segment 32774).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
DATA : lv_werks LIKE bapi_order_prodplant_range, "werks_d,
lv_material like bapi_order_material_range. " bapi_order_material_range.
DATA: gs_return LIKE bapiret2,
gs_return1 LIKE bapiret2,
gt_order_header LIKE STANDARD TABLE OF bapi_order_header1,
gs_order_header LIKE bapi_order_header1,
gt_operation LIKE STANDARD TABLE OF bapi_order_operation1,
gs_operation LIKE bapi_order_operation1,
gt_final_operation LIKE STANDARD TABLE OF bapi_order_operation1,
gs_final_operation LIKE bapi_order_operation1.
SELECTION-SCREEN :BEGIN OF BLOCK a1 WITH FRAME TITLE text-004.
SELECTION-SCREEN COMMENT /1(30) comm3.
SELECT-OPTIONS: p_werks1 FOR lv_werks NO-EXTENSION NO INTERVALS MODIF ID sc2. "OBLIGATORY marc-werks
SELECT-OPTIONS: s_matnr1 FOR lv_material MODIF ID sc2. "OBLIGATORY mara-matnr
SELECTION-SCREEN :END OF BLOCK a1 .
CALL FUNCTION 'BAPI_PRODORD_GET_LIST'
EXPORTING
COLLECTIVE_ORDER =
IMPORTING
return = gs_return
TABLES
ORDER_NUMBER_RANGE =
material_range = s_matnr1[]
prodplant_range = p_werks1[]
PLANPLANT_RANGE =
ORDER_TYPE_RANGE =
MRP_CNTRL_RANGE =
PROD_SCHED_RANGE =
SALES_ORD_RANGE =
SALES_ORD_ITM_RANGE =
WBS_ELEMENT_RANGE =
SEQ_NO_RANGE =
ORDER_PRIO_RANGE =
order_header = gt_order_header[]
.
IF gs_return IS NOT INITIAL.
WRITE : gs_return-message.
EXIT.
ENDIF.
Nitin
03-21-2011 12:48 PM
Hi,
lv_material is a structure.
Maybe it will work if you declare
SELECT-OPTIONS: s_matnr1 FOR lv_material-low MODIF ID sc2.
You have select-options for a range structure. This is one to much.
I don't know why it works for plant, because there seems to be the same mistake!
regards,
Klaus