SAP ISM_SD_BAG_STATE_SET_N Function Module for Change Recall BAG









ISM_SD_BAG_STATE_SET_N is a standard ism sd bag state set n SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Change Recall BAG processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for ism sd bag state set n FM, simply by entering the name ISM_SD_BAG_STATE_SET_N into the relevant SAP transaction such as SE37 or SE38.

Function Group: JKSDCOLLECTIONBAG
Program Name: SAPLJKSDCOLLECTIONBAG
Main Program: SAPLJKSDCOLLECTIONBAG
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ISM_SD_BAG_STATE_SET_N pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'ISM_SD_BAG_STATE_SET_N'"Change Recall BAG
EXPORTING
* IM_BAG = "GUID in 'RAW' Format
* IM_UNSOLDGP = "
* IM_ROLE = 'RM' "Partner role
* IM_PLANT = "Plant
* IM_COLLECTDATE = "IS-M: Recall Date
* IM_COLLECTTYPE = "Return Collection Reason
* IM_STATE = "Status of Return Collection
* IM_TESTRUN = ' ' "Checkbox Field
* IM_CANCEL = "Reset Status

IMPORTING
EX_JKSDCOLLECTBAG = "Recall Dates By Business Partner
EX_RETURN_TAB = "IS-M: BAPIRET2 Table
.



IMPORTING Parameters details for ISM_SD_BAG_STATE_SET_N

IM_BAG - GUID in 'RAW' Format

Data type: JKSDBAGID
Optional: Yes
Call by Reference: Yes

IM_UNSOLDGP -

Data type: JUNSOLDGPNR
Optional: Yes
Call by Reference: Yes

IM_ROLE - Partner role

Data type: PARVW
Default: 'RM'
Optional: Yes
Call by Reference: Yes

IM_PLANT - Plant

Data type: WERKS_D
Optional: Yes
Call by Reference: Yes

IM_COLLECTDATE - IS-M: Recall Date

Data type: ISMCOLLDATE
Optional: Yes
Call by Reference: Yes

IM_COLLECTTYPE - Return Collection Reason

Data type: JKSDAUART_RETURNCOLL
Optional: Yes
Call by Reference: Yes

IM_STATE - Status of Return Collection

Data type: JKSDCOLLSTATE
Optional: Yes
Call by Reference: Yes

IM_TESTRUN - Checkbox Field

Data type: XFELD
Default: SPACE
Optional: No
Call by Reference: Yes

IM_CANCEL - Reset Status

Data type: XFELD
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for ISM_SD_BAG_STATE_SET_N

EX_JKSDCOLLECTBAG - Recall Dates By Business Partner

Data type: JKSDCOLLECTBAG
Optional: No
Call by Reference: Yes

EX_RETURN_TAB - IS-M: BAPIRET2 Table

Data type: BAPIRET2TAB
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ISM_SD_BAG_STATE_SET_N Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_im_bag  TYPE JKSDBAGID, "   
lv_ex_jksdcollectbag  TYPE JKSDCOLLECTBAG, "   
lv_im_unsoldgp  TYPE JUNSOLDGPNR, "   
lv_ex_return_tab  TYPE BAPIRET2TAB, "   
lv_im_role  TYPE PARVW, "   'RM'
lv_im_plant  TYPE WERKS_D, "   
lv_im_collectdate  TYPE ISMCOLLDATE, "   
lv_im_collecttype  TYPE JKSDAUART_RETURNCOLL, "   
lv_im_state  TYPE JKSDCOLLSTATE, "   
lv_im_testrun  TYPE XFELD, "   SPACE
lv_im_cancel  TYPE XFELD. "   

  CALL FUNCTION 'ISM_SD_BAG_STATE_SET_N'  "Change Recall BAG
    EXPORTING
         IM_BAG = lv_im_bag
         IM_UNSOLDGP = lv_im_unsoldgp
         IM_ROLE = lv_im_role
         IM_PLANT = lv_im_plant
         IM_COLLECTDATE = lv_im_collectdate
         IM_COLLECTTYPE = lv_im_collecttype
         IM_STATE = lv_im_state
         IM_TESTRUN = lv_im_testrun
         IM_CANCEL = lv_im_cancel
    IMPORTING
         EX_JKSDCOLLECTBAG = lv_ex_jksdcollectbag
         EX_RETURN_TAB = lv_ex_return_tab
. " ISM_SD_BAG_STATE_SET_N




ABAP code using 7.40 inline data declarations to call FM ISM_SD_BAG_STATE_SET_N

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
DATA(ld_im_role) = 'RM'.
 
 
 
 
 
DATA(ld_im_testrun) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!