Skip to main content

Posts

Customized F4 Help

Function Module:  F4IF_INT_TABLE_VALUE_REQUEST Create types: TYPES :  BEGIN  OF  ty_values ,          lot    TYPE  qplos ,          batch  TYPE  charg_d ,          material  TYPE  matnr ,           date  TYPE  datum ,         END  OF  ty_values . Declare internal table and work area. DATA :  it_values       TYPE  STANDARD  TABLE  OF  ty_values  WITH  KEY  lot ,       wa_values       TYPE  ty_values . DATA :  it_return  TYPE  STANDARD  TABLE  OF  ddshretval. Create the event to request the value AT  SELECTION-SCREEN  ON  ...

Total in Smartforms Table

 Process of adding total or subtotal in smartforms main table are as follows Create a global variable named 'Total' (in this case it is a quantity field) Expand main window. Double click on table node. Then go to calculation tab. Select Sum Total for operation column. Then provide the field name for which sum operation will be executed. Put global variable ('Total') in the target field name column. Put after loop in the time column. Now create a table row in the footer section. Into the cell where you want to maintain total value, create a text. Then put the global variable ('Total'). Now execute the form and you will find the total value.

Invalid Cursor Dump

 If it is regarding smartforms, just test the smartforms from transaction code "SMARTFORMS" and it will be fixed. Dump details are provided in below screenshot,

Applying Error Message to Selection Screen without Changing Screen

Problem: Need to set an error message programmatically for selection screen field without changing screen. Example: if selection screen contains plant field. We have to make this field mandatory without using obligatory statement. Error message will be shown at the time clicking on execute button but the screen should not be changed. Solution: An error message needs to be set with apropriate logic. But the message type should be 'S' and message should be displayed like 'E'. Then ' LEAVE  LIST-PROCESSING' statement needs to be implemented which will return to selection screen as soon as the error is shown . ABAP Code Example:    IF  s_plant  IS  INITIAL . "Where s_plant is an input field parameters      MESSAGE  'Please enter plant'  TYPE  'S'  DISPLAY  LIKE  'E' .      LEAVE  LIST-PROCESSING .    ENDIF . '

Edit SAP Table Entry Using Debug Mode

 If your table maintenance generator is not working you can edit your table data using below steps. You can even delete the data. Go to transaction code SE16 Find the data you want to edit or delete Select the data and click on the display icon to display the line item data into vertical format Now put '/H' in the command box to debug the program Now change the value of variable "code" from 'SHOW' to 'EDIT' (to edit the value) or 'DELE' (to delete the value) Now click on continue The screen will open in change mode and you can change the data.

List of Useful Function Modules/BAPIs in SAP ABAP

In SAP and ABAP, a function module refers to a self-contained unit of code that performs a specific task or function. These modules are designed to be reusable and can be called from other parts of the program or from different programs altogether. Function modules are used to encapsulate business logic or perform specific operations within an SAP system. Some useful function modules are listed below. FICO: FTI_FISCAL_YEAR_MONTH_GET (To get Fiscal Year and Month) GET_CURRENT_YEAR(Getting current fiscal year) MM: /SPE/READ_CLASSIFICATION_DATA (Getting Batch Characteristics) PP:  BAPI_PROCORD_CREATE (Process Order Creation) BAPI_REQIREMENTS_CREATE (PIR Creation) BAPI_REQUIREMENTS_CHANGE (PIR Change) CO_XT_COMPONENT_CHANGE (PP Order Component Change) CSAP_MAT_BOM_READ (BOM Read) AIP9_STATUS_READ (Order Status Read, OBJNR = OR + order)  HCM: RKE_SELECT_FACTDAYS_FOR_PERIOD (Calculating Working Days) ABAP: ALSM_EXCEL_TO_INTERNAL_TABLE (Excel to Internal Table) RRBA_NUMBER_RANGE_RESE...