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

Problem with transaction KKS2

Former Member
0 Likes
843

Hi all

I am having a transaction KKS2..,,, I want to pass the transaction's output to an internal table .,,,

In my report i am calling the transaction KKS2 using call transaction statement , ,,, after executuion of the statement , i want to pass the output of that transcation to an internal table.,,,,

Even i cannot use the submit statement , becos my standard report is MODULE POOL REPORT

Hoping for ur wonderful support please!!!

Regards

karthikeyan

Edited by: Alvaro Tejada Galindo on Mar 19, 2008 6:31 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
729

Try the below code.



DATA list_tab TYPE TABLE OF abaplist. 
" SAPMKKS0 is the program name for tcode KKS2
SUBMIT SAPMKKS0 EXPORTING LIST TO MEMORY 
              AND RETURN. 

CALL FUNCTION 'LIST_FROM_MEMORY' 
  TABLES 
    listobject = list_tab 
  EXCEPTIONS 
    not_found  = 1 
    OTHERS     = 2. 

IF sy-subrc = 0. 
  CALL FUNCTION 'WRITE_LIST' 
    TABLES 
      listobject = list_tab. 
ENDIF. 

hope it would help you

Regards,

Venkatram

Try the below code.



DATA list_tab TYPE TABLE OF abaplist. 
" SAPMKKS0 is the program name for tcode KKS2
SUBMIT SAPMKKS0 EXPORTING LIST TO MEMORY 
              AND RETURN. 

CALL FUNCTION 'LIST_FROM_MEMORY' 
  TABLES 
    listobject = list_tab 
  EXCEPTIONS 
    not_found  = 1 
    OTHERS     = 2. 

IF sy-subrc = 0. 
  CALL FUNCTION 'WRITE_LIST' 
    TABLES 
      listobject = list_tab. 
ENDIF. 

hope it would help you

Regards,

Venkatram

3 REPLIES 3
Read only

Former Member
0 Likes
730

Try the below code.



DATA list_tab TYPE TABLE OF abaplist. 
" SAPMKKS0 is the program name for tcode KKS2
SUBMIT SAPMKKS0 EXPORTING LIST TO MEMORY 
              AND RETURN. 

CALL FUNCTION 'LIST_FROM_MEMORY' 
  TABLES 
    listobject = list_tab 
  EXCEPTIONS 
    not_found  = 1 
    OTHERS     = 2. 

IF sy-subrc = 0. 
  CALL FUNCTION 'WRITE_LIST' 
    TABLES 
      listobject = list_tab. 
ENDIF. 

hope it would help you

Regards,

Venkatram

Read only

0 Likes
729

HI

Thanks for ur kind reply.,, But the problem is that it is a module pool program.,,

So its going for dump.,,

Could you plese sugesst some other soliution??

Regards

karthik

Read only

0 Likes
729

Try the below code.



DATA list_tab TYPE TABLE OF abaplist. 
" SAPMKKS0 is the program name for tcode KKS2
SUBMIT ZREP1 EXPORTING LIST TO MEMORY 
              AND RETURN. 
 
CALL FUNCTION 'LIST_FROM_MEMORY' 
  TABLES 
    listobject = list_tab 
  EXCEPTIONS 
    not_found  = 1 
    OTHERS     = 2. 
 
IF sy-subrc = 0. 
  CALL FUNCTION 'WRITE_LIST' 
    TABLES 
      listobject = list_tab. 
ENDIF. 

The program ZREP1 will have the following code.


REPORT ZREP1.

CALL TRANSACTION KKS2 AND SKIP FIRST SCREEN.

Hope this helps.

Thanks,

Venkatram