cancel
Showing results for 
Search instead for 
Did you mean: 

smart form data fetching

Former Member
0 Kudos

hi,

I got some doubt that how can we solve this following, please give some sample code for this as follows.

Pass KUNNR from table KNA1 to get the list of contact persons. Then get the contact title in table KNVK for ABTNR (contact department) = 1001. If there is only one contact maintained for the customer then picks the same with out checking for the department.

So how can i check that more than one contact.

Thank you,

regards

raghu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ragusankar .

In the drive program:

Create the select-options for kunnr.

Create the smartforms as per your requirement.

include the smartforms in the drive program

Regards,

Sravanthi

Former Member
0 Kudos

Hi,

Your requirement is not quiet clear to me. as per my understanding iam giving you some logic here.

1. Select KUNNR from table KNA1 into itab(Pass your conditions here)

2. select (Contact title-field) from KNVK into itab1 where ABTNR = '1001'.

3. Describe table itab1 into lines.

4. if lines = 1.

read table itab into wa index 1.

if sy-subrc eq 0.

(Yourdestination-field) = wa-(Contact title - field).

endif.

endif.

Thanks,

Sree.