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

How to access sap data which in our program

Former Member
0 Likes
1,221

Hello

I am using a custom program in which i am calling sap standrad includes. in one of the sap standrad include ,one internal table is getting filledup.now i have to display a message in my program based on that internal table.how to access the data in my program?

Hello

I am using a custom program in which i am calling sap standrad includes. in one of the sap standrad include ,one internal table is getting filledup.now i have to display a message in my program based on that internal table.how to access the data in my program?

9 REPLIES 9
Read only

Former Member
0 Likes
1,169

Is that table defined in global scope or local to some perform??

Read only

Former Member
0 Likes
1,169

Hello Raj

Please go through the sample code bellow, which may solve your problem

DATA: profile TYPE TABLE OF user04 .

CALL FUNCTION 'SUSR_GET_PROFILES_OF_USER_RFC'

  EXPORTING

    user_name       = sy-uname

  TABLES

    profile         = profile

  EXCEPTIONS

    user_not_exists = 1

    no_authority    = 2

    OTHERS          = 3.

IF sy-subrc .

WRITE : /  l_r_usr02-ustyp.

Read only

Former Member
0 Likes
1,169

Hello Raj

Please go through the sample code bellow, which may solve your problem

DATA: profile TYPE TABLE OF user04 .

CALL FUNCTION 'SUSR_GET_PROFILES_OF_USER_RFC'

  EXPORTING

    user_name       = sy-uname

  TABLES

    profile         = profile

  EXCEPTIONS

    user_not_exists = 1

    no_authority    = 2

    OTHERS          = 3.

IF sy-subrc .

WRITE : /  l_r_usr02-ustyp.

Read only

Former Member
0 Likes
1,169

Hello Raj

Please go through the sample code bellow, which may solve your problem

DATA: profile TYPE TABLE OF user04 .

CALL FUNCTION 'SUSR_GET_PROFILES_OF_USER_RFC'

  EXPORTING

    user_name       = sy-uname

  TABLES

    profile         = profile

  EXCEPTIONS

    user_not_exists = 1

    no_authority    = 2

    OTHERS          = 3.

IF sy-subrc .

WRITE : /  l_r_usr02-ustyp.

Read only

Former Member
0 Likes
1,169

Hello Raj

Please go through the sample code bellow, which may solve your problem

DATA: profile TYPE TABLE OF user04 .

CALL FUNCTION 'SUSR_GET_PROFILES_OF_USER_RFC'

  EXPORTING

    user_name       = sy-uname

  TABLES

    profile         = profile

  EXCEPTIONS

    user_not_exists = 1

    no_authority    = 2

    OTHERS          = 3.

IF sy-subrc .

WRITE : /  l_r_usr02-ustyp.

Read only

Former Member
0 Likes
1,169

Hello Raj

Please go through the sample code bellow, which may solve your problem

DATA: profile TYPE TABLE OF user04 .

CALL FUNCTION 'SUSR_GET_PROFILES_OF_USER_RFC'

  EXPORTING

    user_name       = sy-uname

  TABLES

    profile         = profile

  EXCEPTIONS

    user_not_exists = 1

    no_authority    = 2

    OTHERS          = 3.

IF sy-subrc .

WRITE : /  l_r_usr02-ustyp.

Read only

Former Member
0 Likes
1,169

Hello Raj

Please go through the sample code bellow, which may solve your problem

DATA: profile TYPE TABLE OF user04 .

*code to get the USR02 details using field symbols

DATA : l_r_usr02 TYPE usr02.

DATA : l_f_text(20) TYPE c.

FIELD-SYMBOLS: <l_fs_usr02> TYPE usr02.

l_f_text = '(SAPLSUST)USR02'.

ASSIGN (l_f_text) TO <l_fs_usr02>.

l_r_usr02 = <l_fs_usr02>.

WRITE : / l_r_usr02-ustyp.

Read only

Former Member
0 Likes
1,169

Hello Raj

Please go through the code bellow, which may solve your problem

DATA: profile TYPE TABLE OF user04 .

*code to get the USR02 details using field symbols

DATA : l_r_usr02 TYPE usr02.

DATA : l_f_text(20) TYPE c.

FIELD-SYMBOLS: <l_fs_usr02> TYPE usr02.

l_f_text = '(SAPLSUST)USR02'.

ASSIGN (l_f_text) TO <l_fs_usr02>.

l_r_usr02 = <l_fs_usr02>.

WRITE : / l_r_usr02-ustyp.

Read only

Former Member
0 Likes
1,169

Sorry i thik you got answer so maney times.But when i press save its going for error here. But actually its getting posted every time i suppose.

Edited by: ramanuja.venkat on Oct 26, 2009 10:54 AM