SAP /ACCGO/CMN_SET_HEADER_DATA Function Module for Transfer Header Data for Additional Screens









/ACCGO/CMN_SET_HEADER_DATA is a standard /accgo/cmn set header data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Transfer Header Data for Additional Screens 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 /accgo/cmn set header data FM, simply by entering the name /ACCGO/CMN_SET_HEADER_DATA into the relevant SAP transaction such as SE37 or SE38.

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



Function /ACCGO/CMN_SET_HEADER_DATA 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 '/ACCGO/CMN_SET_HEADER_DATA'"Transfer Header Data for Additional Screens
EXPORTING
IM_AKTYP = "Activity category in SAP transaction
IM_TAXI_FCODE = "Function Code
* IM_KOMWBHE_OLD = "Reference YKOMWBHE
* IM_KOMWBHP_OLD = "Reference YKOMWBHP
* IM_KOMWBHD_OLD = "Reference YKOMWBHD
* IM_KOMWBHI_OLD = "Reference YKOMWBHI
* IM_KOMWBHK_OLD = "Reference YKOMWBHK
* IMT_TB2BS1 = "GTM: Table Type for TB2BS1

CHANGING
CH_TAXI_PROGRAM = "ABAP Program Name
CH_TAXI_SCREEN = "Number of the following screen
CH_KOMWBHK = "Reference KOMWBHK
* CH_KOMWBHD = "Reference KOMWBHd
* CHT_KOMWBHE = "Reference XKOMWBHE
* CHT_KOMWBHP = "Reference XKOMWBHP
* CHT_KOMWBHD = "Reference XKOMWBHD
CHT_KOMWBHI = "Reference XKOMWBHI

EXCEPTIONS
/ACCGO/CX_CMN_EXCEPTION = 1 /ACCGO/CX_MCK_OPR_FAILED = 2
.



IMPORTING Parameters details for /ACCGO/CMN_SET_HEADER_DATA

IM_AKTYP - Activity category in SAP transaction

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

IM_TAXI_FCODE - Function Code

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

IM_KOMWBHE_OLD - Reference YKOMWBHE

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

IM_KOMWBHP_OLD - Reference YKOMWBHP

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

IM_KOMWBHD_OLD - Reference YKOMWBHD

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

IM_KOMWBHI_OLD - Reference YKOMWBHI

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

IM_KOMWBHK_OLD - Reference YKOMWBHK

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

IMT_TB2BS1 - GTM: Table Type for TB2BS1

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

CHANGING Parameters details for /ACCGO/CMN_SET_HEADER_DATA

CH_TAXI_PROGRAM - ABAP Program Name

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

CH_TAXI_SCREEN - Number of the following screen

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

CH_KOMWBHK - Reference KOMWBHK

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

CH_KOMWBHD - Reference KOMWBHd

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

CHT_KOMWBHE - Reference XKOMWBHE

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

CHT_KOMWBHP - Reference XKOMWBHP

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

CHT_KOMWBHD - Reference XKOMWBHD

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

CHT_KOMWBHI - Reference XKOMWBHI

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

EXCEPTIONS details

/ACCGO/CX_CMN_EXCEPTION - Exception class for commodity contract

Data type:
Optional: No
Call by Reference: Yes

/ACCGO/CX_MCK_OPR_FAILED - Marketing Contract Operation Failed

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for /ACCGO/CMN_SET_HEADER_DATA 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_aktyp  TYPE AKTYP, "   
lv_ch_taxi_program  TYPE REPID, "   
lv_/accgo/cx_cmn_exception  TYPE REPID, "   
lv_im_taxi_fcode  TYPE FCODE, "   
lv_ch_taxi_screen  TYPE DYNNR, "   
lv_/accgo/cx_mck_opr_failed  TYPE DYNNR, "   
lv_ch_komwbhk  TYPE DATA, "   
lv_im_komwbhe_old  TYPE DATA, "   
lv_ch_komwbhd  TYPE DATA, "   
lv_im_komwbhp_old  TYPE DATA, "   
lv_cht_komwbhe  TYPE DATA, "   
lv_im_komwbhd_old  TYPE DATA, "   
lv_cht_komwbhp  TYPE DATA, "   
lv_im_komwbhi_old  TYPE DATA, "   
lv_cht_komwbhd  TYPE DATA, "   
lv_im_komwbhk_old  TYPE DATA, "   
lv_imt_tb2bs1  TYPE TB2BS1_ITAB, "   
lv_cht_komwbhi  TYPE DATA. "   

  CALL FUNCTION '/ACCGO/CMN_SET_HEADER_DATA'  "Transfer Header Data for Additional Screens
    EXPORTING
         IM_AKTYP = lv_im_aktyp
         IM_TAXI_FCODE = lv_im_taxi_fcode
         IM_KOMWBHE_OLD = lv_im_komwbhe_old
         IM_KOMWBHP_OLD = lv_im_komwbhp_old
         IM_KOMWBHD_OLD = lv_im_komwbhd_old
         IM_KOMWBHI_OLD = lv_im_komwbhi_old
         IM_KOMWBHK_OLD = lv_im_komwbhk_old
         IMT_TB2BS1 = lv_imt_tb2bs1
    CHANGING
         CH_TAXI_PROGRAM = lv_ch_taxi_program
         CH_TAXI_SCREEN = lv_ch_taxi_screen
         CH_KOMWBHK = lv_ch_komwbhk
         CH_KOMWBHD = lv_ch_komwbhd
         CHT_KOMWBHE = lv_cht_komwbhe
         CHT_KOMWBHP = lv_cht_komwbhp
         CHT_KOMWBHD = lv_cht_komwbhd
         CHT_KOMWBHI = lv_cht_komwbhi
    EXCEPTIONS
        /ACCGO/CX_CMN_EXCEPTION = 1
        /ACCGO/CX_MCK_OPR_FAILED = 2
. " /ACCGO/CMN_SET_HEADER_DATA




ABAP code using 7.40 inline data declarations to call FM /ACCGO/CMN_SET_HEADER_DATA

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!