I was trying to create a network from abap editor using the 'BAPI_BUS2002_CREATE' but I have encountered a dump. Here is my entire code below:-
* Declaration based on the Import & Export parameters of BAPI create
DATA LV_AUFNR TYPE NW_AUFNR.
DATA LV_NETWRK TYPE BAPI_BUS2002_NEW.
DATA LT_RESULT TYPE TABLE OF BAPIRET2.
PARAMETERS: P_AUFNR TYPE NW_AUFNR. " Order Number
* Trying to pass the value of network entered in parameters to the FM for creation.
LV_NETWRK-NETWORK = P_AUFNR.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2002_CREATE'
EXPORTING
I_NETWORK = LV_NETWRK
TABLES
ET_RETURN = LT_RESULT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Regards.