Application Development 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: 

calling AL11 transaction inside a report program

Former Member
0 Kudos
2,124

Hi All,

I have a requirement where in my report program should call AL11 transaction based on the button click.

i tried using Submit rswatch0 and return, but it is not opening the AL11 directory.

Please guide me.

Thanks in Advance.

1 ACCEPTED SOLUTION

thanga_prakash
Active Contributor
0 Kudos
670

Try with function module ALINK_CALL_TRANSACTION or any other function module which is used for transaction code execute.

Might be there is a problem with authority check. Use function module with transaction execute and authority check.

16 REPLIES 16

former_member183045
Contributor
0 Kudos
670

Hi.

Did you already try the following command?

Call transaction 'AL11'.

Regards, Andreas

0 Kudos
670

Hi Andreas,

I have tried but its not opening the folder directory.

0 Kudos
670

Whats the folder directory?

0 Kudos
670

With folder directory you mean the ALV list of key (DIR_...) and values (path of directory), right?

Are you working with dynpro and PAI event as suggested below?

Maybe the best solution path is if you set a break-point at the "CALL statement" to see if it is called like suggested below and/or evaluate the return code of the statement.

Regards, Andreas

0 Kudos
670

I'm working on normal Report program In the Alv output there is a field, if i click that field it should trigger AL11 transaction. i have created a hotspot for the field. Now how to trigger AL11.  i tried using submit statement and even with call transaction, but none of them are triggering the AL11 FOLDER DIRECTORY.

0 Kudos
670

i need to open AL11 inside a program. Thats my requirement.

0 Kudos
670

can you copy paste your code here?

0 Kudos
670

THIS IS MY OUTPUT  : for eg

FIELD1

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

/interfacesXI/EXCEL_UPLOAD

/interfacesXI/sap

/interfacesXI/sap1

/interfacesXI/dataloads

/interfacesXI/inbound

/interfacesXI/outbound

/interfacesXI/

In the above alv output, if i click the respective link, it has to take me to that repective Al11 FOLDER.

0 Kudos
670

THIS IS MY OUTPUT  : for eg

FIELD1

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

/interfacesXI/EXCEL_UPLOAD

/interfacesXI/sap

/interfacesXI/sap1

/interfacesXI/dataloads

/interfacesXI/inbound

/interfacesXI/outbound

/interfacesXI/

In the above alv output, if i click the respective link, it has to take me to that repective Al11 FOLDER.

former_member182805
Active Participant
0 Kudos
670

In the PAI module in your module pool program, check the value of the Function code for the button and enter the code

IF FCODE = X.

Call transaction AL11.

ENDIF.

thanga_prakash
Active Contributor
0 Kudos
671

Try with function module ALINK_CALL_TRANSACTION or any other function module which is used for transaction code execute.

Might be there is a problem with authority check. Use function module with transaction execute and authority check.

raymond_giuseppi
Active Contributor
0 Kudos
670

Set a break-point on the SUBMIT statement, test you program, do you actually execute the statement?

Regards,

Raymond

0 Kudos
670

I executed the statement. Its not opening the AL11 directory

0 Kudos
670

What happen when you execute AL11 from SAP menu, authorization problem, could you execute SU53?

Hint: If your actual question was how to display a specific directory, try toad following code before calling AL11 or RSWATCH0


EXPORT

  p1 = list_filename

  p2 = file_list-dirname

  p3 = file_list-name

  TO MEMORY ID 'RSWATCH0'.

Regards,

Raymond

0 Kudos
670

Hi Saikanth,

This can be acheived by calling a system function . The below are system functions to read files from the AL11 directory :-


    Call 'C_DIR_READ_FINISH'
       id 'ERRNO'  field p1
       id 'ERRMSG' field p2

call 'C_DIR_READ_START' id 'DIR'    field dir_name
                           id 'FILE'   field a_generic_name
                           id 'ERRNO'  field file-errno
                           id 'ERRMSG' field file

call 'C_DIR_READ_NEXT'
       id 'TYPE'   field file-type
       id 'NAME'   field file-name
       id 'LEN'    field file-len
       id 'OWNER'  field file-owner
       id 'MTIME'  field file-mtime
       id 'MODE'   field file-mode
       id 'ERRNO'  field file-errno
       id 'ERRMSG' field file-errmsg.

call 'C_DIR_READ_FINISH'
       id 'ERRNO'  field file_list-errno
       id 'ERRMSG' field file_list-errmsg.

WARNING : This statement is for internal use only.  It must not be used in application programs.

raphael_almeida
Active Contributor
0 Kudos
670

I know you want to develop a solution on the AL11, but you've got to look at this open source project ?!

http://scn.sap.com/community/abap/blog/2012/05/03/al11-replacement


Best Regards,


Raphael Pacheco.