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

help need

Former Member
0 Likes
654

Hi friends,

Could u please help me how to do this

Read table KNB1 using company code(BUKRS) and G/L Recon Acct(AKONT)

Read table KNA1 using KNB1-KUNNR

If Not found,put out error message,skip processing and read next KNB1 record

“KNA1 Record not found for company code(BUKRS), and customer(KUNNR)

Assign fields from KNA1 table to output Record

Customer name = KNA1-NAME1

Customer address = KNA1-STRAS

Customer city = KNA1-ORT01

Tax id = KNA1-STCD1

Postal code = KNA1-PSTLZ

Read table KNVP using company code (BUKRS), customer number (KUNNR), and Partner Type(PARVW) of “RG”

If found, sold to customer =KNVP-KUNNR & Payer = KNVP-KUNN2

If not found, put out error message, skip processing and read next KNB1 record

“KNVP record not found for company code (BUKRS) , customer(KUNNR), and partner type (RG)

Assign non table related fields

Record type = “c”

Sequence number = sequence number +1

Branch = “1”

Delivery Number = ??? (to be determined)

Write output record using format selected

For output File use Logical& physical name parameters

Increment counter for number of output records

Go to read next KNB1 record

At the end of KNB1 records, put out control totals (after error messages)

Number of KNB1 values found

Number of KNA1 values not found

Number of KNVP values not found

Number of output records created

i have a lot of confusion how to do this

urgent help me

Regards

srilavi

4 REPLIES 4
Read only

Former Member
0 Likes
611

Hi Srilavi,

do u want to write the code ???

thanks

Vikranth Khimavath

Read only

0 Likes
611

hi thnaks,

dont write the code give me some guide lines

Thanks Regards

srilavi

Read only

Former Member
0 Likes
611

U can try it in the following way.

SELECT fields

FROM KNB1

into table itab

WHERE bukrs = pbukrs and AKONT = pakont.

loop at itab.

select single fields

from kna1

where kunnr = itab-kunnr.

if sy-subrc <> 0.

Error KNA1 record not found.

endif.

...similarly follow for the rest.

endloop.

Regards

Anurag

Read only

Former Member
0 Likes
611

heloooooo kunche

give ur mail id

i have some sample interface code with me

ill send u

regards,

siri.