Monday 21 November 2016

Important Function Module related to Number Range

Calling Number Range Object Maintenance by own Transaction Code

Number Range Object with Year Enabled Flag

Number Range Object & Sub Object

Details of Number Range Object Creation, Interval Creation, Buffering, Warning

Number Range Object - Intro



 Check the link: Number Range Object-1



Sunday 4 September 2016

Instance Operator- NEW(Part 2)



Please check the link:    Instance Operator- NEW(Part 2)



------------------------------------------------------------------------------------------------------------------------------------------------

Instance Operator- NEW(Part 1)




Please check the link:  Instance Operator- NEW(Part 1)


---------------------------------------------------------------------------------------------------------------------------------------------

Mesh in ABAP- Forward & Inverse Association



Please check the link: Mesh in ABAP- Forward & Inverse Association

-----------------------------------------------------------------------------------------------------------------------------------------------

Mesh- in ABAP



Please check the link: Mesh- in ABAP

--------------------------------------------------------------------------------------------------------------------------------------------

Sunday 26 June 2016

How to Know Material Info easily!

Many times we create material master by referring to another already created material. We need to know what is the industry sector and material type in Tx- MM01.
12
Go to Tx- MM03 and provide the already created material that you want to refer to create a new material.
3
Choose  Basic Data 1.
4
Select the marked [ i ] icon.
5
It displays the industry sector and the material type of the material. You can easily know this without going back to the DB tables and checking the details.
6
----------------------------------------------------------------------------------------------------------------------------------------

Dynamic call to FM with PARAMETER-TABLE

The below post shows how to call a FM dynamically and passing all the parameters by using PARAMETER-TABLE option.
We have the below FM with parameters in different sections such as import, export, tables.
12345
The source code returns a table of records from SFLIGHT table if the selection criteria meets else sends back only a text message.67

PRORGAM
TYPE-POOLSabap.
DATAfm_name   TYPE rs38l_fnam VALUE ‘FLIGHT_DETAILS’,
              lt_param  TYPE abap_func_parmbind_tab,
              ls_param  TYPE abap_func_parmbind,
              lv_msg    TYPE string,
              lt_flight TYPE TABLE OF sflight.
FIELD-SYMBOLS<fs_msg>     TYPE string,
                                    <fs_details> TYPE ANY TABLE.
PARAMETERSp_carr TYPE sflightcarrid,
                             p_conn TYPE sflightconnid,
                             p_date TYPE sflightfldate.
* Build parameters
ls_paramname ‘CARRID’.
ls_paramkind abap_func_exporting.
GET REFERENCE OF p_carr INTO ls_paramvalue.
APPEND ls_param TO lt_param.
CLEAR ls_param.
ls_paramname ‘CONNID’.
ls_paramkind abap_func_exporting.
GET REFERENCE OF p_conn INTO ls_paramvalue.
APPEND ls_param TO lt_param.
CLEAR ls_param.
ls_paramname ‘FLDATE’.
ls_paramkind abap_func_exporting.
GET REFERENCE OF p_date INTO ls_paramvalue.
APPEND ls_param TO lt_param.
CLEAR ls_param.
ls_paramname ‘MSG’.
ls_paramkind abap_func_importing.
GET REFERENCE OF lv_msg INTO ls_paramvalue.
APPEND ls_param TO lt_param.
CLEAR ls_param.
ls_paramname ‘DETAILS’.
ls_paramkind abap_func_tables.
GET REFERENCE OF lt_flight INTO ls_paramvalue.
APPEND ls_param TO lt_param.
CLEAR ls_param.
* Dynamic FM call with all import,export,table parameters
* passed in the Parameter-table
CALL FUNCTION fm_name
  PARAMETERTABLE lt_param.
READ TABLE lt_param INTO ls_param WITH KEY name ‘MSG’.
IF sysubrc IS INITIAL.
  ASSIGN ls_paramvalue->TO <fs_msg>.
  IF <fs_msg> IS ASSIGNED AND <fs_msg> IS NOT INITIAL.
    WRITE:/ <fs_msg>.
  ELSE.
    READ TABLE lt_param INTO ls_param WITH KEY name ‘DETAILS’.
    IF sysubrc IS INITIAL.
      ASSIGN ls_paramvalue->TO <fs_details>.
      IF <fs_details> IS ASSIGNED AND <fs_details> IS NOT INITIAL .
        lt_flight =   <fs_details>.
        CALL FUNCTION ‘REUSE_ALV_GRID_DISPLAY’
          EXPORTING
            i_callback_program syrepid
            i_structure_name   ‘SFLIGHT’
          TABLES
            t_outtab           lt_flight.
      ENDIF.
    ENDIF.
  ENDIF.
ENDIF.

13.jpg
RUN & OUTPUT- For the selection criteria no data is present in SFLIGHT table.
89
RUN & OUTPUT- For the selection criteria data is present in SFLIGHT table.
1011

Needed Info defined in TYPE GROUP- ABAP
12
-------------------------------------------------------------------------------------------------------------------------------------------

Comments system

Disqus Shortname