SAP ISM_LAST_AD_SPEC_NO_GET Function Module for IS-M/AM: Determine Most Recent Ad Spec Number for the Order
ISM_LAST_AD_SPEC_NO_GET is a standard ism last ad spec no get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for IS-M/AM: Determine Most Recent Ad Spec Number for the Order 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 last ad spec no get FM, simply by entering the name ISM_LAST_AD_SPEC_NO_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: JHTD
Program Name: SAPLJHTD
Main Program: SAPLJHTD
Appliation area: J
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISM_LAST_AD_SPEC_NO_GET 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_LAST_AD_SPEC_NO_GET'"IS-M/AM: Determine Most Recent Ad Spec Number for the Order.
EXPORTING
PV_POS_ART = "IS-M: Order-Publishing-Media - Item Type
* PT_RJHAMOT = "
* PT_RJHAMOTW = "
* PT_RJHAMOTO = "
IMPORTING
PV_LAST_MOTIV = "IS-M: Order Ad Spec Number (Ad)
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLJHTD_001 IS-M/AM: Set Status Characteristics for an Ad Spec
EXIT_SAPLJHTD_002 IS-M/AM: Conversion of Characters, Words, or Lines to Column Millimeters
EXIT_SAPLJHTD_003 IS-M/AM: Conversion of Characters, Words or Lines to Page Parts
EXIT_SAPLJHTD_004 IS-M/AM: Check Completeness and Plausibility of an Ad Spec
EXIT_SAPLJHTD_005 IS-M/AM: Define Default Ad Spec
EXIT_SAPLJHTD_006 IS-M/AM: Plausibility Checks for Positioning Instructions
EXIT_SAPLJHTD_007 IS-M/AM: Convert Ad Sizes
EXIT_SAPLJHTD_008 IS-M/AM: Convert Ad Spec Widths and Heights
EXIT_SAPLJHTD_009 IS-M/AM: Define Default Ad Spec Master
EXIT_SAPLJHTD_010 IS-M/AM: Check Completeness and Plausibility of Ad Spec Master
EXIT_SAPLJHTD_011 IS-M/AM: Set Status Characteristics for a Commercial Ad Spec
EXIT_SAPLJHTD_012 IS-M/AM: Define Default Ad Spec (Commercial)
EXIT_SAPLJHTD_013 IS-M/AM: Define Default Ad Spec (Online)
EXIT_SAPLJHTD_014 IS-M/AM: Check Completness and Plausibility of an Ad Spec (Online)
EXIT_SAPLJHTD_015 IS-M/AM: Set Status Characteristics for an Online Ad Spec
EXIT_SAPLJHTD_016 IS-M/AM: Check Completeness and Plausibility of an Ad Spec
IMPORTING Parameters details for ISM_LAST_AD_SPEC_NO_GET
PV_POS_ART - IS-M: Order-Publishing-Media - Item Type
Data type: RJHAP-POS_ARTOptional: No
Call by Reference: No ( called with pass by value option)
PT_RJHAMOT -
Data type: JHA1_RJHAMOT_TABOptional: Yes
Call by Reference: Yes
PT_RJHAMOTW -
Data type: JHA1_RJHAMOTW_TABOptional: Yes
Call by Reference: Yes
PT_RJHAMOTO -
Data type: JHA1_RJHAMOTO_TABOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ISM_LAST_AD_SPEC_NO_GET
PV_LAST_MOTIV - IS-M: Order Ad Spec Number (Ad)
Data type: RJHAMOT-MOTIVOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ISM_LAST_AD_SPEC_NO_GET 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_pv_pos_art | TYPE RJHAP-POS_ART, " | |||
| lv_pv_last_motiv | TYPE RJHAMOT-MOTIV, " | |||
| lv_pt_rjhamot | TYPE JHA1_RJHAMOT_TAB, " | |||
| lv_pt_rjhamotw | TYPE JHA1_RJHAMOTW_TAB, " | |||
| lv_pt_rjhamoto | TYPE JHA1_RJHAMOTO_TAB. " |
|   CALL FUNCTION 'ISM_LAST_AD_SPEC_NO_GET' "IS-M/AM: Determine Most Recent Ad Spec Number for the Order |
| EXPORTING | ||
| PV_POS_ART | = lv_pv_pos_art | |
| PT_RJHAMOT | = lv_pt_rjhamot | |
| PT_RJHAMOTW | = lv_pt_rjhamotw | |
| PT_RJHAMOTO | = lv_pt_rjhamoto | |
| IMPORTING | ||
| PV_LAST_MOTIV | = lv_pv_last_motiv | |
| . " ISM_LAST_AD_SPEC_NO_GET | ||
ABAP code using 7.40 inline data declarations to call FM ISM_LAST_AD_SPEC_NO_GET
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.| "SELECT single POS_ART FROM RJHAP INTO @DATA(ld_pv_pos_art). | ||||
| "SELECT single MOTIV FROM RJHAMOT INTO @DATA(ld_pv_last_motiv). | ||||
Search for further information about these or an SAP related objects