Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calling function module in Infoset In SQ02 , abap

Former Member
0 Likes
3,554

Hi Expert,

I have requirement to call the custom function module in Info set in  SQ02  and execute through SQ01.

I created info set zcdmc in menubar GOto->Code->Freecoding.

I written following code.

types : BEGIN OF YT_FINAL,
          CREATION_DATE TYPE ZSM_CDMC-CREATION_DATE,
          PROJ_ID TYPE ZSM_CDMC-PROJ_ID,
          KPI_NAME TYPE ZSM_CDMC-KPI_NAME,
          COUNT1 TYPE ZSM_CDMC-COUNT1,
         END OF YT_FINAL.


  data: it_final_result TYPE STANDARD TABLE OF yt_final,
         wa_final_result type yt_final.


  SELECTION-SCREEN BEGIN OF SCREEN 123.
  SELECT-OPTIONS : zPeriod for SY-DATUM .
  SELECTION-SCREEN END OF SCREEN 123.


  CALL FUNCTION 'ZFSOLMAN_CDMC'
    EXPORTING
      ZPROJECT_ID = zPeriod
    TABLES
      IT_FINAL1   = it_final_result.

But when i was execute it through the Dum

i.e. Statement is not accessible

CALL FUNCTION 'ZFSOLMAN_CDMC'

Please suggest me how to resolve it

Please go through attachment of screen short and code.


Hi Expert,

I have requirement to call the custom function module in Info set in  SQ02  and execute through SQ01.

I created info set zcdmc in menubar GOto->Code->Freecoding.

I written following code.

types : BEGIN OF YT_FINAL,
          CREATION_DATE TYPE ZSM_CDMC-CREATION_DATE,
          PROJ_ID TYPE ZSM_CDMC-PROJ_ID,
          KPI_NAME TYPE ZSM_CDMC-KPI_NAME,
          COUNT1 TYPE ZSM_CDMC-COUNT1,
         END OF YT_FINAL.


  data: it_final_result TYPE STANDARD TABLE OF yt_final,
         wa_final_result type yt_final.


  SELECTION-SCREEN BEGIN OF SCREEN 123.
  SELECT-OPTIONS : zPeriod for SY-DATUM .
  SELECTION-SCREEN END OF SCREEN 123.


  CALL FUNCTION 'ZFSOLMAN_CDMC'
    EXPORTING
      ZPROJECT_ID = zPeriod
    TABLES
      IT_FINAL1   = it_final_result.

But when i was execute it through the Dum

i.e. Statement is not accessible

CALL FUNCTION 'ZFSOLMAN_CDMC'

Please suggest me how to resolve it

Please go through attachment of screen short and code.


3 REPLIES 3
Read only

Former Member
0 Likes
1,811

Hi ,

I propose to divide your code between 3 Code Sections:

DATA

types : BEGIN OF YT_FINAL,
          CREATION_DATE TYPE ZSM_CDMC-CREATION_DATE,
          PROJ_ID TYPE ZSM_CDMC-PROJ_ID,
          KPI_NAME TYPE ZSM_CDMC-KPI_NAME,
          COUNT1 TYPE ZSM_CDMC-COUNT1,
         END OF YT_FINAL.


  data: it_final_result TYPE STANDARD TABLE OF yt_final,
         wa_final_result type yt_final.


  SELECTION-SCREEN BEGIN OF SCREEN 123.
  SELECT-OPTIONS : zPeriod for SY-DATUM .
  SELECTION-SCREEN END OF SCREEN 123.

Record Processing

Perform call_function.

Free coding

form call_function.

CALL FUNCTION 'ZFSOLMAN_CDMC'

    EXPORTING

      ZPROJECT_ID = zPeriod

    TABLES

      IT_FINAL1   = it_final_result.

endform.

Regards.

Read only

0 Likes
1,811

Hi ,

I  add 4 custom field i.e.

Creation_date

Project_id

KPI_Name

Count1

And in the field code session i past the code  .

Could you please tell me how to achieve result  through sq01.

Regards,

Jayesh

Read only

0 Likes
1,811