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

Display specified data by retrieving it from a particular database table.

Former Member
0 Likes
588

Hi friends, my database table consist of the followings: employee, department, position and salary.

I wanted to create a screen of displaying all the employees of a particular poistion in a particular department.( eg.: all managers in the Human Resource department.)

Table: department>position

The following is my current coding(i only manage to display screen but unable to retrieve the specificed data).

MODULE USER_COMMAND_0800 INPUT.

IF sy-ucomm = 'EXIT'.

LEAVE PROGRAM.

ELSEIF sy-ucomm = 'EXE'.

PERFORM set_memory.

SUBMIT z112_display.

ENDIF.

ENDMODULE.

FORM set_memory.

TABLES Z112_WORK2.

DATA: mem_DEPT(15) TYPE C.

mem_DEPT = Z112_WORK2-DEPT.

FREE MEMORY ID 'DEPT'.

EXPORT mem_DEPT TO MEMORY ID 'DEPT'.

ENDFORM.

Edited by: yingzi huang on Dec 24, 2008 4:54 AM

4 REPLIES 4
Read only

Former Member
0 Likes
534

Hi,

Looks like u r missing something.

You must be displaying this data on a Table Control based on the selection made on the selection Screen......Create an Internal Table of same structure as of Table Control and populate the same in the Program based on the selection Screen input.

In the PBO...simply populate the Table Control using Internal Table....

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
534

Hi,

If you want the data from memory, use import statement in PBO.

Read only

former_member194669
Active Contributor
0 Likes
534

What will be the code in z112_display ?

a®

Read only

Former Member
0 Likes
534

Hi Yingzi,

Try to use LEAVE TO LIST PROCESSING in the PAI. Use this if you are trying to display the output using a report program.

THank you,

Best Regards,

Shashikanth. D