Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Abap short dump

$
0
0

Hi Experts,

 

               I am facing this short dump can any one figure out the solution for this.Below is the code .

 

TABLES  MARC.

 

TYPE-POOLS: SLIS.

 

SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-001.

   PARAMETERS  : M_MATNR TYPE MARC-MATNR,

                 W_WERKS TYPE MARC-WERKS.

SELECTION-SCREEN END OF BLOCK A.

 

TYPES: BEGIN OF TYP_MARC,

   MATNR TYPE MARC-MATNR,

   WERKS TYPE MARC-WERKS,

END OF TYP_MARC.

 

TYPES: TT_MARC TYPE TYP_MARC.

 

DATAIT_MARC TYPE TABLE OF TT_MARC,

       IT_MDPSX LIKE TABLE OF  MDPS,

       IT_FCAT  TYPE SLIS_T_FIELDCAT_ALV.

 

DATAWA_MARC TYPE TYP_MARC,

       WA_FCAT  TYPE SLIS_FIELDCAT_ALV.

 

DATA : IT_FIELDCAT_ALV TYPE  TABLE OF SLIS_FIELDCAT_ALV,

       IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

       WA_FIELDCAT_ALV TYPE  SLIS_FIELDCAT_ALV,

       WA_LAYOUT  TYPE SLIS_LAYOUT_ALV . " FIELDCAT DECLARATION

 

DATA : LV_MATNR LIKE MARC-MATNR,

        LV_WERKS LIKE MARC-WERKS.

LV_MATNR = M_MATNR.

LV_WERKS = W_WERKS.

 

START-OF-SELECTION.

PERFORM FILL_STOCK.

PERFORM FIELDCAT.

PERFORM DISPLAY_DETAILS.

 

FORM FILL_STOCK.

   CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'

   EXPORTING

     MATNR                          = LV_MATNR

     WERKS                          = LV_WERKS

 

   TABLES

     MDPSX                          = IT_MDPSX

   EXCEPTIONS

     MATERIAL_PLANT_NOT_FOUND       = 1

     PLANT_NOT_FOUND                = 2

     OTHERS                         = 3

     .

ENDFORM.

 

FORM FIELDCAT .

     PERFORM F_BUILD_FC USING '1'  'MATNR' 'IT_MDPSX' 'Material'  '5' '' '' ."

     PERFORM F_BUILD_FC USING '2'  'WERKS' 'IT_MDPSX' 'Plant' '15' '' '' ."

ENDFORM.                    " FIELDCAT

 

*&---------------------------------------------------------------------*

*&                FIELD CATLOG PARAMETER DECLARATION

*&---------------------------------------------------------------------*

*----------------------------------------------------------------------*

DATA : P_COLOR(4) TYPE C VALUE 'C110'.

FORM F_BUILD_FC  USING    VALUE(P1)

       VALUE(P2)

       VALUE(P3)

       VALUE(P4)

       VALUE(P5)

       VALUE(P6)

       P_COLOR.

 

   WA_FIELDCAT_ALV-COL_POS       = P1.

   WA_FIELDCAT_ALV-FIELDNAME     = P2.

   WA_FIELDCAT_ALV-TABNAME       = P3.

   WA_FIELDCAT_ALV-REPTEXT_DDIC  = P4.

   WA_FIELDCAT_ALV-OUTPUTLEN     = P5.

   WA_FIELDCAT_ALV-HOTSPOT       = P6.

   WA_FIELDCAT_ALV-EMPHASIZE       = P_COLOR.

 

   WA_LAYOUT-ZEBRA = 'X'.

   WA_FIELDCAT_ALV-NO_ZERO = 'X'.

   WA_LAYOUT-colwidth_optimize = 'X'.

 

   APPEND WA_FIELDCAT_ALV TO IT_FIELDCAT.

   CLEAR WA_FIELDCAT_ALV.

 

ENDFORM.                    "F_BUILD_FC

 

FORM DISPLAY_DETAILS.

   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

   EXPORTING

     I_CALLBACK_PROGRAM = SY-CPROG

       IS_LAYOUT          = WA_LAYOUT

     IT_FIELDCAT        = IT_FIELDCAT

   TABLES

     T_OUTTAB           = IT_MDPSX.

ENDFORM.

 

 

Thanks

Vinod.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>