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

selections

Former Member
0 Likes
546

If we want to select multiple customers to get all selected cutomer order details ?

If we want to select multiple customers to get all selected cutomer order details ?

3 REPLIES 3
Read only

Former Member
0 Likes
529

Hi

Write

table kna1.

select-options: s_kunnr for kna1-kunnr.

select vbeln kunnr audat from VBAK into table itab

where kunnr in s_kunnr.

this will fetch all the customers sales orders entered on the selection screen.

Reward points for useful Answers

Regards

Anji

Read only

alex_m
Active Contributor
0 Likes
529

Can you please explain in detail.

Read only

varma_narayana
Active Contributor
0 Likes
529

Hi,

What i understatnd from ur doubt is:

In the basic list u want to display all the Customer details

(Here you display a Check box for each customer.

Eg:

DATA :BOX.

START-OF-SELECTION.

SELECT * FROM KNA1 INTO TABLE IT_KNA1.

END-OF-SELECTION.

LOOP AT IT_KNA1.

WRITE: / BOX AS CHECK-BOX,

IT_KNA1-KUNNR.

ENDLOOP.

In the Secondary list you can display the Orders of all customers selected.

i.e Checkboxes selected.

AT line-selection.

case SY-LSIND.

WHEN 1.

DO .

READ LINE SY-INDEX

FIELD VALUES BOX IT_KNA1-KUNNR.

IF SY-SUBRC NE 0.

EXIT.

ENDIF.

IF BOX = 'X'.

SELECT * FROM VBAK APPENDING TABLE IT_VBAK

WHERE KUNNR = IT_VBAK-KUNNR.

ENDIF.

ENDDO.

Hope this will solve.

Regards.

ENDCASE.