12-12-2006 2:31 PM
REPORT OBJECT :
devlope a inter active report which displays all the sales orders for one particular customer and contact information about the particular customer.
this is my object.
any one help me for generate code for this object with out using ALV'S.
12-12-2006 3:49 PM
Hello pravardhan
The appropriate BAPIs are BAPI_SALESORDER_GETLIST, BAPI_CUSTOMER_GETDETAIL2 and BAPI_CUSTOMER_GETCONTACTLIST.
Regards
Uwe
12-12-2006 3:49 PM
Hello pravardhan
The appropriate BAPIs are BAPI_SALESORDER_GETLIST, BAPI_CUSTOMER_GETDETAIL2 and BAPI_CUSTOMER_GETCONTACTLIST.
Regards
Uwe
12-22-2006 2:32 PM
12-12-2006 4:20 PM
Hi,
Check this example..It will take the customer input and display the orders for that customer..The customer information given in the top of page..
TYPE-POOLS: slis.
Data declaration.
DATA: BEGIN OF itab OCCURS 0,
vbeln TYPE vbeln,
erdat TYPE erdat,
auart TYPE auart,
netwr TYPE vbak-netwr,
END OF itab.
DATA: wa_kna1 TYPE kna1.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
Selection-screen.
PARAMETERS: p_kunnr TYPE kunnr OBLIGATORY.
AT SELECTION-SCREEN.
SELECT SINGLE * FROM kna1 INTO wa_kna1
WHERE kunnr = p_kunnr.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'Invalid customer'.
LEAVE LIST-PROCESSING.
ENDIF.
START-OF-SELECTION.
Building the field catalog.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'VBELN'.
s_fieldcatalog-outputlen = '12'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'ERDAT'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'AUART'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'AUART'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'NETWR'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'NETWR_AK'.
s_fieldcatalog-do_sum = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
Get the sales orders.
SELECT vbeln erdat auart netwr
FROM
vbak
INTO TABLE itab
WHERE kunnr = p_kunnr.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'No records found'.
LEAVE LIST-PROCESSING.
ENDIF.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
Events
DATA: t_events TYPE slis_t_event,
s_events LIKE LINE OF t_events.
s_events-name = 'TOP_OF_PAGE'.
s_events-form = 'TOP_OF_PAGE'.
APPEND s_events TO t_events.
Display the alv
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = t_fieldcatalog
it_events = t_events[]
TABLES
t_outtab = itab.
----
FORM TOP_OF_PAGE *
----
........ *
----
FORM top_of_page.
WRITE: / 'Customer - ', p_kunnr.
WRITE: / 'Name - ', wa_kna1-name1.
ENDFORM.
Thanks,
Naren
12-13-2006 6:43 AM
Hi,
This is program i have coded for my purpose .
Hope this helps you .
This contains even the interactive list .
tables : vbak, kna1, vbap.
types : begin of ty_st1,
vbeln type vbak-vbeln,
ernam type vbak-ernam,
erdat type vbak-erdat,
name1 type kna1-name1,
end of ty_st1,
begin of ty_st2,
matnr type makt-matnr,
maktx type makt-maktx,
charg type vbap-charg,
posar type vbap-posar,
end of ty_st2.
data : it_st1 type table of ty_st1,
it_st2 type table of ty_st2,
wa_st1 type ty_st1,
wa_st2 type ty_st2.
data : len type c,
dummy(10) type c,
offset type i.
*&----
*& BASIC LIST
*&----
SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-009.
SELECTION-SCREEN SKIP 1.
select-options date for vbak-erdat."obligatory.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK BLOCK1 .
if date-low is initial or date-high is initial.
message i002(zgayatri).
else.
if date is initial.
message i002(zgayatri).
else.
select vbak~vbeln
vbak~ernam
vbak~erdat
kna1~name1
into table it_st1
from vbak
inner join kna1 on vbakkunnr = kna1kunnr
where vbak~erdat between date-low and date-high .
uline at (86).
write : / text-001,
15 text-002,
32 text-003,
50 text-004,
86 sy-vline .
new-line.
uline at (86).
if sy-subrc <> 0.
message E000(zgayatri).
else.
loop at it_st1 into wa_st1.
write : / wa_st1-vbeln, sy-vline,
15 wa_st1-ernam, sy-vline,
35 wa_st1-erdat, sy-vline,
50 wa_st1-name1, sy-vline.
uline at (86).
endloop.
endif.
endif.
endif.
*&----
*& AT LINE-SELECTION
*&----
at line-selection.
clear wa_st1.
if sy-lisel(1) = '-'.
elseif sy-lisel(1) = 'd'.
else.
*&----
*& PROCESS WITH SY-LISEL
*&----
dummy = sy-lisel(10).
len = strlen( dummy ).
offset = 10 - len.
dummy = '0000000000'.
concatenate dummy(offset) sy-lisel(len) into wa_st1-vbeln.
*&----
*& DETAIL LIST
*&----
select maktmatnr maktmaktx vbapcharg vbapposar
into table it_st2
from makt
inner join vbap on vbapmatnr = maktmatnr
where vbap~vbeln = wa_st1-vbeln and spras = 'EN'.
if sy-subrc <> 0.
message E000(zgayatri).
else.
uline at (107).
write : / text-005,
25 text-006,
67 text-007,
95 text-008,
107 sy-vline.
loop at it_st2 into wa_st2.
uline at (107).
write : / wa_st2-matnr, sy-vline,
25 wa_st2-maktx, sy-vline,
70 wa_st2-charg, sy-vline,
105 wa_st2-posar, sy-vline.
endloop.
uline at (107).
endif.
endif.
12-22-2006 2:31 PM
hi,
chrishna chaitanya.
thank for solving my problem.
i think you are satisfied with six points.
if you are not satisfied i am sorry.
once again thanks.
you receving this message relply me because i want to you happy are not.
once again thanks.
my mail id is : prava_sairam@yahoo.co.in