cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript

Former Member
0 Kudos

Hi,

I want to print customer no and name from kna1 on the top followed with order details from vbak. It should take range of customer number. any suggestions

thank you

Accepted Solutions (1)

Accepted Solutions (1)

RoySayak
Active Participant
0 Kudos

r u creating ur own script? or modifying some standard?

Former Member
0 Kudos

creating my own script

RoySayak
Active Participant
0 Kudos

ok fine.

as u said u r going to deal with multiple customer nos. u need to use control break statement in your driver program. data in the internal table should be sorted according to KUNNR. and assume u have a final internal table containg all data except the customer description,

the driver program loop should be in this way.

loop at t_final.

on change of kunnr.

if sy-tabix <> 1.

call function 'write_form'......

this write form should call a text element in which there will be only one new-page statement in layout.

endif.

read table T_KNA1 with key kunnr = t_final-KUNNR.

it is to fetch the cust name

endon.

call function 'write_form'

to writye the line items in the main window.

endloop.

then in an window of the layout set write t_final-kunnr & t_kna1-name1.

it'll work.

Reward if useful

Thanks

Sayak

Former Member
0 Kudos

thank you for your quick reply but what should be in t_final

Edited by: Pavan kosaraju on Dec 22, 2007 5:02 AM

Former Member
0 Kudos

T_FINAL may contain these fields

VBELN, PONSR, MATNR, MAKTX, NETWR, WAERS, KUNNR, KWMNGE, MEINS

Regards

ANUPAM

Answers (0)