Need help in ABAP.
HI gurus,
I AM KISHORE i am SD consultant.here my client is asking to create some programmes. i need help in simple programmes so that as per that i can change the fiels as per my requirement.
i am in real big problem now .i know these are very simple programmes but i don't know ABC of programming.
can some one help me in this regard. this ABAP help is needed for me only for some time.
the requirement:
create program which will produce list with:
Materia number; Material description ; Valuation class, Standard price with curency and unit.
Select conditions:
Material number,
Plant,
Material type as mandatory
Material Group as mandatory,
LP/KD/MIP (LABOR) as mandatory,
Replenishment strategy (TEMPB) as mandatory,
Valuation class,
Flag for deletion-Client Level with initial value <> X (only materials without flag for deletion)
Simple List is enough
reagrds
kishore
Hi
Eventhough i cant fullfill your complete requirement. I'm giving u a report performed by me in which most of the fields are covered ask any of abaper to make modifications in this report and change it to accordingly ur requirement. I think it will solve 80% of ur work
* tables
TABLES: ekko,ekbe,ekpo,ekkn,konh,konv,esll,ekbz,rseg,lfa1,j_1ipart1,
j_1igrxref.
TYPE-POOLS: slis.
*data definituon
DATA:
wa_ekko LIKE ekko,
wa_ekbe LIKE ekbe,
wa_ekkn LIKE ekkn,
wa_konp LIKE konp,
wa_ekpo LIKE ekpo,
wa_rbkp LIKE rbkp,
wa_j_1ipart1 LIKE j_1ipart1,
wa_j_1igrxref LIKE j_1igrxref,
wa_rseg LIKE rseg OCCURS 0 WITH HEADER LINE.
DATA: ws_vakey LIKE konh-vakey,
ws_kbetr LIKE konp-kbetr,
ws_kbetr1 LIKE konp-kbetr,
ws_kbetr2 LIKE konp-kbetr,
ws_ecs LIKE j_1igrxref-ecs,
ws_ebelp LIKE ekbz-ebelp,
ws_ebeln LIKE ekko-ebeln,
ws_belnr LIKE ekbe-belnr,
ws_beznk LIKE rbkp-beznk,
ws_wrbtr_f LIKE ekbz-wrbtr,
ws_rmwwr LIKE rbkp-rmwwr,
ws_rbkp_benz.
*internal tables
DATA: BEGIN OF int_outtab OCCURS 0,
lifnr LIKE ekko-lifnr, " vend no
name1 LIKE lfa1-name1, " vend name
werks LIKE ekpo-werks, " plant
ebeln LIKE ekko-ebeln, " po no
knumv LIKE ekko-knumv,
ebelp LIKE ekbe-ebelp,
matnr LIKE ekpo-matnr, " mat no
txz01 LIKE ekpo-txz01, " mat desceiption
kostl LIKE ekkn-kostl, " cost center
ps_psp_pnr LIKE ekkn-ps_psp_pnr, " WBS element
netwr LIKE ekpo-netwr,
" basic value (po)
kbetr LIKE konp-kbetr,
" excise value (po)
kwert_i LIKE konv-kwert,
" insurance value (po)
kwert_f LIKE konv-kwert,
" frieght value (po)
kwert_t LIKE konv-kwert,
" vat/tax value (po)
kwert_o LIKE konv-kwert,
" others (po)
kwert_total LIKE konv-kwert,
" total (po)
ecs LIKE j_1igrxref-ecs,
" excise (ap)
wmwst1 LIKE rbkp-wmwst1,
" tax amount (ap)
wrbtr_f TYPE ekbz-wrbtr,
" freight (ap)
wrbtr TYPE ekbz-wrbtr,
beznk LIKE rbkp-beznk,
" Unplanned cost (ap)
refwr_g TYPE ekbe-refwr,
" gross (ap)
rmwwr LIKE rbkp-rmwwr,
" Actual Invoice Total (ap)
buzei LIKE ekbz-buzei, "item for material doc
gjahr LIKE ekbe-gjahr,
tax LIKE ekbe-wrbtr, " tax (ap)
actual_total LIKE ekbe-wrbtr,
* belnr LIKE rseg-belnr,
belnr LIKE ekbe-belnr,
vakey LIKE konh-vakey,
cpudt LIKE ekbe-cpudt,
budat LIKE ekbz-budat,
belnr_ekbz LIKE ekbz-belnr, "to get excise value
* aedat LIKE ekpo-aedat,
bedat LIKE ekko-bedat,
waers LIKE lfm1-waers, " currency
END OF int_outtab.
DATA: int_konv LIKE konv OCCURS 0 WITH HEADER LINE,
* int_ekbe LIKE ekbe OCCURS 0 WITH HEADER LINE,
int_ekbz LIKE ekbz OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF int_konh OCCURS 0,
knumh LIKE konh-knumh,
kschl LIKE konh-kschl,
vakey LIKE konh-vakey,
END OF int_konh.
DATA: BEGIN OF int_konp OCCURS 0,
knumh LIKE konp-knumh,
kschl LIKE konp-kschl,
kbetr LIKE konp-kbetr,
END OF int_konp.
DATA: BEGIN OF int_ekkn OCCURS 0,
ebeln LIKE ekkn-ebeln,
ebelp LIKE ekkn-ebelp,
kostl LIKE ekkn-kostl,
ps_psp_pnr LIKE ekkn-ps_psp_pnr,
END OF int_ekkn.
DATA: BEGIN OF int_outtab1 OCCURS 0,
exbed LIKE j_1igrxref-exbed,
ecs LIKE j_1igrxref-ecs,
END OF int_outtab1.
DATA: BEGIN OF int_ekbe OCCURS 0,
ebelp LIKE ekbe-ebelp,
refwr LIKE ekbe-refwr,
wrbtr LIKE ekbe-wrbtr,
shkzg LIKE ekbe-shkzg,
END OF int_ekbe.
DATA: BEGIN OF int_total OCCURS 0,
ebeln LIKE ekko-ebeln,
ebelp LIKE ekbe-ebelp,
actual_total LIKE ekbe-wrbtr,
END OF int_total.
DATA: BEGIN OF int_excise OCCURS 0,
ebeln LIKE ekko-ebeln,
kbetr LIKE konp-kbetr,
END OF int_excise.
DATA: BEGIN OF int_rseg OCCURS 0,
ebeln LIKE rseg-ebeln,
ebelp LIKE rseg-ebelp,
lfbnr LIKE rseg-lfbnr,
matnr LIKE rseg-matnr,
lfgja LIKE rseg-lfgja,
belnr LIKE rseg-belnr,
ecs LIKE j_1igrxref-ecs,
beznk LIKE rbkp-beznk,
wrbtr_f LIKE ekbz-wrbtr,
rmwwr LIKE rbkp-rmwwr,
END OF int_rseg.
DATA: BEGIN OF int_rbkp OCCURS 0,
belnr LIKE rbkp-belnr,
beznk LIKE rbkp-beznk,
rmwwr LIKE rbkp-rmwwr,
tcode LIKE rbkp-tcode,
END OF int_rbkp.
****ALV list definintion
DATA: ws_cat TYPE slis_t_fieldcat_alv ,
int_cat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
g_custom_container TYPE REF TO cl_gui_custom_container.
*selection-screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 19(23) text-002.
SELECT-OPTIONS: s_lifnr FOR ekko-lifnr obligatory.
*PARAMETERS:p_lifnr LIKE ekko-lifnr .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 25(17) text-006.
*PARAMETERS:p_ebeln LIKE ekko-ebeln obligatory.
SELECT-OPTIONS:s_ebeln FOR ekko-ebeln .
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 25(23) text-003.
*PARAMETERS:p_ekorg LIKE ekko-ekorg.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 25(20) text-004.
*PARAMETERS:p_werks LIKE ekpo-werks obligatory.
*SELECT-OPTIONS: S_werks FOR ekpo-werks obligatory.
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 25(23) text-005.
*SELECT-OPTIONS:s_bedat FOR ekko-bedat.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM get_data.
PERFORM field_catalog.
PERFORM display_data.
END-OF-SELECTION.
*& Form get_data
* text
FORM get_data.
* start of Vender details
***vender no, vender name, po no,service/mat no, service/mat description
SELECT ekko~lifnr ekko~ebeln ekko~knumv ekko~bedat
ekpo~werks ekpo~matnr ekpo~txz01 ekpo~werks
ekpo~netwr
* ekpo~aedat
ekbe~ebelp ekbe~belnr
lfa1~name1
INTO CORRESPONDING FIELDS OF TABLE int_outtab
FROM ( ( ( ekko
JOIN ekbe ON ekbe~ebeln = ekko~ebeln AND
ekbe~vgabe = '2' )
JOIN ekpo ON ekpo~ebeln = ekko~ebeln AND
ekpo~ebelp = ekbe~ebelp )
JOIN lfa1 ON lfa1~lifnr = ekko~lifnr )
WHERE
* ekko~lifnr = P_lifnr AND
* ekko~ebeln IN S_ebeln AND
** ekpo~werks IN S_werks AND
ekbe~vgabe = '2'.
***WBS/Cost center
SELECT ebeln ebelp kostl ps_psp_pnr FROM ekkn INTO int_ekkn
FOR ALL ENTRIES IN int_outtab
WHERE ebeln = int_outtab-ebeln AND
ebelp = int_outtab-ebelp.
APPEND int_ekkn.
ENDSELECT.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebeln OR int_outtab-ebelp.
LOOP AT int_ekkn WHERE ebeln = int_outtab-ebeln AND
ebelp = int_outtab-ebelp.
IF int_ekkn-kostl <> ' '.
MOVE int_ekkn-kostl TO int_outtab-kostl.
ELSE.
MOVE int_ekkn-ps_psp_pnr TO int_outtab-kostl.
" int_outtab-ps_psp_pnr.
ENDIF.
ENDLOOP.
MODIFY int_outtab.
ENDON.
ENDLOOP.
*end of Vender details*****
*******Start of calculation of PO
*****Excise calculation of po
LOOP AT int_outtab.
CONCATENATE int_outtab-werks int_outtab-lifnr int_outtab-matnr INTO
ws_vakey.
MOVE ws_vakey TO int_outtab-vakey.
MODIFY int_outtab.
ENDLOOP.
LOOP AT int_outtab.
* ON CHANGE OF int_outtab-ebeln OR int_outtab-vakey.
ON CHANGE OF int_outtab-ebelp.
SELECT knumh kschl vakey FROM konh INTO int_konh
* FOR ALL ENTRIES IN int_outtab
WHERE vakey = int_outtab-vakey AND
datab <= int_outtab-bedat AND
datbi > int_outtab-bedat AND
( kschl = 'JMOP' OR kschl = 'JEC1' ).
SELECT knumh kschl kbetr FROM konp INTO int_konp
WHERE knumh = int_konh-knumh .
IF int_konp-kschl = 'JMOP'.
ws_kbetr = int_konp-kbetr / 1000 * int_outtab-netwr.
ws_kbetr1 = ws_kbetr.
ENDIF.
IF int_konp-kschl = 'JEC1'.
ws_kbetr2 = int_konp-kbetr / 1000 * ws_kbetr1.
ENDIF.
ws_kbetr = ws_kbetr + ws_kbetr2.
ENDSELECT.
ENDSELECT.
ENDON.
* ENDON.
MOVE ws_kbetr TO int_outtab-kbetr.
MODIFY int_outtab.
CLEAR: ws_kbetr, ws_kbetr1, ws_kbetr2.
ENDLOOP.
LOOP AT int_outtab.
* ON CHANGE OF int_outtab-ebeln OR int_outtab-vakey.
int_excise-kbetr = int_outtab-kbetr.
int_excise-ebeln = int_outtab-ebeln.
APPEND int_excise.
* ENDON.
ENDLOOP.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebeln.
LOOP AT int_excise WHERE ebeln = int_outtab-ebeln.
ws_kbetr = ws_kbetr + int_excise-kbetr.
ENDLOOP.
ENDON.
int_outtab-kbetr = ws_kbetr.
MODIFY int_outtab.
CLEAR ws_kbetr.
ENDLOOP.
***** Insurance, Freight,Vat/ST, Other, Total***********
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebelp OR int_outtab-ebeln.
CLEAR int_konv.
SELECT * FROM konv INTO CORRESPONDING FIELDS OF int_konv
WHERE knumv = int_outtab-knumv AND
kposn = int_outtab-ebelp AND
( ( kschl <> 'RA00' )
AND ( kschl <> 'RA01' ) AND ( kschl <> 'RB00' )
AND ( kschl <> 'PBXX' ) AND ( kschl <> 'PB00' )
AND ( kschl <> 'RC00' ) AND ( kschl <> 'RL01' )
AND ( kschl <> 'ZC00' ) AND ( kschl <> 'ZA00' )
AND ( kschl <> 'ZA01' ) AND ( kschl <> 'HB01' )
AND ( kschl <> 'ZBED' ) AND ( kschl <> 'ZAED' )
AND ( kschl <> 'ZSED' ) AND ( kschl <> 'ZAE1' )
AND ( kschl <> 'ZSE1' ) AND ( kschl <> 'ZCEX' )
AND ( kschl <> 'ZPRO' ) AND ( kschl <> 'ZTRD' )
AND ( kschl <> 'ZPK4' ) AND ( kschl <> 'ZSTX' )
AND ( kschl <> 'ZASS' ) AND ( kschl <> 'ZJCD' )
AND ( kschl <> 'HB00') ).
APPEND int_konv.
ENDSELECT.
ENDON.
ENDLOOP.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebelp OR int_outtab-knumv.
LOOP AT int_konv WHERE kposn = int_outtab-ebelp AND
knumv = int_outtab-knumv.
* lifnr = int_outtab-lifnr.
***** tax
IF ( ( int_konv-kschl = 'NAVS' ) OR ( int_konv-kschl = 'NAVM' )
int_outtab-kwert_t = int_outtab-kwert_t + int_konv-kwert.
ELSE.
*****freight
IF ( ( int_konv-kschl = 'FRA1' ) OR ( int_konv-kschl = 'FRB1'
OR ( int_konv-kschl = 'FRC1'
int_outtab-kwert_f = int_outtab-kwert_f + int_konv-kwert.
ELSE.
*****insurance
IF ( ( int_konv-kschl = 'ZGIN' ) OR ( int_konv-kschl =
'ZIN2' ) ).
int_outtab-kwert_i = int_outtab-kwert_i + int_konv-kwert.
ELSE.
****others
IF NOT ( ( int_konv-kschl = 'NAVS' ) OR (
int_konv-kschl = 'NAVM' )
OR ( int_konv-kschl = 'FRA1' ) OR (
int_konv-kschl = 'FRB1' )
OR ( int_konv-kschl = 'FRC1' ) OR (
int_konv-kschl = 'ZGIN' )
OR ( int_konv-kschl = 'ZIN2' ) OR (
int_konv-kschl = 'RA00' )
OR ( int_konv-kschl = 'RA01' ) OR (
int_konv-kschl = 'RB00' )
OR ( int_konv-kschl = 'PBXX' ) OR (
int_konv-kschl = 'PB00' )
OR ( int_konv-kschl = 'RC00' ) OR (
int_konv-kschl = 'RL01' ) ).
int_outtab-kwert_o = int_outtab-kwert_o +
int_konv-kwert.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
****total
int_outtab-kwert_total = int_outtab-kwert_t
+ int_outtab-kwert_f
+ int_outtab-kwert_i
+ int_outtab-kwert_o
+ int_outtab-netwr.
ENDON.
MODIFY int_outtab.
ENDLOOP.
******End of calculation of PO
*start of calculation for actual payment
*****Excise
sort int_outtab by ebelp ebeln.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebelp OR int_outtab-ebeln.
SELECT * FROM rseg INTO CORRESPONDING FIELDS OF int_rseg
* FOR ALL ENTRIES IN int_outtab
WHERE ebeln = int_outtab-ebeln AND
ebelp = int_outtab-ebelp.
APPEND int_rseg.
ENDSELECT.
ENDON.
ENDLOOP.
sort int_rseg by ebelp lfbnr matnr.
LOOP AT int_rseg.
ON CHANGE OF int_outtab-ebelp OR int_rseg-lfbnr OR int_rseg-matnr OR
int_rseg-lfgja.
SELECT * FROM j_1ipart1 INTO wa_j_1ipart1
WHERE mblnr = int_rseg-lfbnr AND
mjahr = int_rseg-lfgja AND
matnr = int_rseg-matnr.
ON CHANGE OF wa_j_1ipart1-mblnr OR wa_j_1ipart1-zeile.
SELECT * FROM j_1igrxref INTO wa_j_1igrxref
WHERE mblnr = wa_j_1ipart1-mblnr AND
zeile = wa_j_1ipart1-zeile.
IF sy-subrc EQ 0.
ws_ecs = ws_ecs + wa_j_1igrxref-exbed + wa_j_1igrxref-ecs.
ENDIF.
ENDSELECT.
ENDON.
ENDSELECT.
ENDON.
MOVE ws_ecs TO int_rseg-ecs.
MODIFY int_rseg TRANSPORTING ecs.
CLEAR: ws_ecs.
ENDLOOP.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebeln.
LOOP AT int_rseg WHERE ebeln = int_outtab-ebeln.
ws_ecs = ws_ecs + int_rseg-ecs.
ENDLOOP.
ENDON.
MOVE ws_ecs TO int_outtab-ecs.
MODIFY int_outtab TRANSPORTING ecs.
CLEAR ws_ecs.
ENDLOOP.
******unplanned costs and actual_invoice_total
SORT int_rseg BY belnr.
LOOP AT int_rseg .
ON CHANGE OF int_rseg-belnr.
SELECT belnr beznk rmwwr tcode FROM rbkp INTO int_rbkp
WHERE belnr = int_rseg-belnr .
APPEND int_rbkp.
ENDSELECT.
ENDON.
ENDLOOP.
SORT int_rseg BY belnr.
SORT int_rbkp BY belnr.
LOOP AT int_rseg.
ON CHANGE OF int_rseg-ebeln OR int_rseg-belnr.
LOOP AT int_rbkp WHERE belnr = int_rseg-belnr.
IF int_rbkp-tcode = 'MR8M'.
int_rbkp-rmwwr = int_rbkp-rmwwr * ( - 1 ).
int_rbkp-beznk = int_rbkp-beznk * ( - 1 ).
ENDIF.
ws_beznk = ws_beznk + int_rbkp-beznk.
ws_rmwwr = ws_rmwwr + int_rbkp-rmwwr.
ENDLOOP.
ENDON.
MOVE ws_beznk TO int_rseg-beznk.
MOVE ws_rmwwr TO int_rseg-rmwwr.
MODIFY int_rseg.
CLEAR: ws_rmwwr, ws_beznk.
ENDLOOP.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebeln.
LOOP AT int_rseg WHERE ebeln = int_rseg-ebeln.
ws_beznk = ws_beznk + int_rseg-beznk.
ws_rmwwr = ws_rmwwr + int_rseg-rmwwr.
ENDLOOP.
ENDON.
MOVE ws_beznk TO int_outtab-beznk.
MOVE ws_rmwwr TO int_outtab-rmwwr.
MODIFY int_outtab.
CLEAR: ws_rmwwr, ws_beznk.
ENDLOOP.
*freight of actual payment
sort int_rseg by belnr ebelp.
LOOP AT int_rseg.
ON CHANGE OF int_rseg-belnr or int_rseg-ebelp..
SELECT * FROM ekbz INTO CORRESPONDING FIELDS OF int_ekbz
WHERE ebeln = int_rseg-ebeln AND
belnr = int_rseg-belnr AND
ebelp = int_rseg-ebelp AND
vgabe = '2' .
IF int_ekbz-shkzg = 'H'.
int_ekbz-wrbtr = int_ekbz-wrbtr * ( - 1 ).
ENDIF.
int_rseg-wrbtr_f = int_rseg-wrbtr_f + int_ekbz-wrbtr.
ENDSELECT.
ENDON.
MODIFY int_rseg.
CLEAR int_rseg-wrbtr_f.
ENDLOOP.
sort int_rseg by ebelp.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebeln OR int_outtab-ebelp.
LOOP AT int_rseg WHERE ebeln = int_outtab-ebeln AND
ebelp = int_outtab-ebelp.
ws_wrbtr_f = ws_wrbtr_f + int_rseg-wrbtr_f.
ENDLOOP.
ENDON.
MOVE ws_wrbtr_f TO int_outtab-wrbtr_f.
MODIFY int_outtab TRANSPORTING wrbtr_f.
CLEAR ws_wrbtr_f.
ENDLOOP.
**tax and gross amt of actual payment
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebelp OR int_outtab-ebeln.
" or int_outtab-belnr.
SELECT ebelp refwr wrbtr shkzg FROM ekbe INTO int_ekbe
WHERE ebelp = int_outtab-ebelp AND
ebeln = int_outtab-ebeln AND
vgabe = '2' .
IF int_ekbe-shkzg = 'H'.
int_ekbe-refwr = int_ekbe-refwr * ( - 1 ).
int_ekbe-wrbtr = int_ekbe-wrbtr * ( - 1 ).
ENDIF.
int_outtab-refwr_g = int_outtab-refwr_g + int_ekbe-refwr.
int_outtab-tax = int_outtab-tax + ( int_ekbe-wrbtr -
int_ekbe-refwr ).
ENDSELECT.
ENDON.
MODIFY int_outtab.
CLEAR int_outtab-refwr_g.
CLEAR int_outtab-tax.
ENDLOOP.
****total
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebelp OR int_outtab-ebeln.
int_outtab-actual_total = int_outtab-actual_total
+ int_outtab-ecs
+ int_outtab-wrbtr_f
+ int_outtab-tax
+ int_outtab-beznk
+ int_outtab-refwr_g.
int_total-actual_total = int_outtab-actual_total.
int_total-ebelp = int_outtab-ebelp.
int_total-ebeln = int_outtab-ebeln.
APPEND int_total.
ENDON.
ENDLOOP.
*end of calculation for actaul payment
*************Modification in internal table*****
LOOP AT int_outtab.
IF int_outtab-ebelp = ws_ebelp AND
int_outtab-ebeln = ws_ebeln.
int_outtab-netwr = 0.
MODIFY int_outtab.
ENDIF.
ws_ebelp = int_outtab-ebelp.
ws_ebeln = int_outtab-ebeln.
ENDLOOP.
LOOP AT int_outtab.
IF int_outtab-netwr IS INITIAL.
DELETE int_outtab INDEX sy-tabix.
ENDIF.
ENDLOOP.
LOOP AT int_outtab.
ON CHANGE OF int_outtab-ebeln.
LOOP AT int_total WHERE ebeln = int_outtab-ebeln.
int_outtab-actual_total = int_outtab-actual_total
+ int_total-actual_total.
ENDLOOP.
ENDON.
MODIFY int_outtab.
ENDLOOP.
LOOP AT int_outtab.
SELECT SINGLE * FROM lfm1 INTO CORRESPONDING FIELDS OF int_outtab
WHERE lifnr = int_outtab-lifnr.
MODIFY int_outtab.
ENDLOOP.
********** end of modification*********
ENDFORM. "get_data
*& Form field_catalog
* text
FORM field_catalog.
***vender no
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'LIFNR'.
int_cat-reptext_ddic = 'Vender No'.
APPEND int_cat TO ws_cat.
*vender name
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'NAME1'.
int_cat-reptext_ddic = 'Vender Name'.
APPEND int_cat TO ws_cat.
** PO No
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'EBELN'.
int_cat-reptext_ddic = 'PO No'.
APPEND int_cat TO ws_cat.
** Mat No
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'MATNR'.
int_cat-reptext_ddic = 'Mat No'.
APPEND int_cat TO ws_cat.
** Matdescription
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'TXZ01'.
int_cat-reptext_ddic = 'Mat description'.
APPEND int_cat TO ws_cat.
**WBS/Cost center
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'KOSTL'.
int_cat-reptext_ddic = 'WBS/Cost center'.
APPEND int_cat TO ws_cat.
**Currency
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'WAERS'.
int_cat-reptext_ddic = 'Currency'.
APPEND int_cat TO ws_cat.
**Basic
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'NETWR'.
int_cat-reptext_ddic = 'Basic'.
APPEND int_cat TO ws_cat.
**Excise
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'KBETR'.
int_cat-reptext_ddic = 'Excise'.
APPEND int_cat TO ws_cat.
**Insurance
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'KWERT_I'.
int_cat-reptext_ddic = 'Insurance'.
APPEND int_cat TO ws_cat.
**Frieght
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'KWERT_F'.
int_cat-reptext_ddic = 'Frieght'.
APPEND int_cat TO ws_cat.
**VAT/ST
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'KWERT_T'.
int_cat-reptext_ddic = 'VAT/ST'.
APPEND int_cat TO ws_cat.
**Other
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'KWERT_O'.
int_cat-reptext_ddic = 'Others'.
APPEND int_cat TO ws_cat.
**Total
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'KWERT_TOTAL'.
int_cat-reptext_ddic = 'Total'.
APPEND int_cat TO ws_cat.
***Excise
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'ECS'.
int_cat-reptext_ddic = 'Excise'.
APPEND int_cat TO ws_cat.
*****Freight
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'WRBTR_F'.
int_cat-reptext_ddic = 'Freight'.
APPEND int_cat TO ws_cat.
*****Tax
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'TAX'.
int_cat-reptext_ddic = 'Tax'.
APPEND int_cat TO ws_cat.
***Unplanned Del Cost
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'BEZNK'.
int_cat-reptext_ddic = 'Unplanned Del Cost'.
APPEND int_cat TO ws_cat.
****Gross
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'REFWR_G'.
int_cat-reptext_ddic = 'Gross'.
APPEND int_cat TO ws_cat.
**Total
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'ACTUAL_TOTAL'.
int_cat-reptext_ddic = 'Total'.
APPEND int_cat TO ws_cat.
**Actual Invoice Total
int_cat-tabname = 'INT_OUTTAB'.
int_cat-fieldname = 'RMWWR'.
int_cat-reptext_ddic = 'Actual Invoice Total'.
APPEND int_cat TO ws_cat.
ENDFORM. "field_catalog
*& Form display_data
* text
FORM display_data.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = 'Z_MM_TEST1'
it_fieldcat = ws_cat[]
TABLES
t_outtab = int_outtab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "display_data
Reward for all helpfull answers
Regards
Pavan
Similar Messages
-
Need help on abap-hr smartform and scripts
hi experts
im new to abap-hr
i want some standard hr scripts and smartforms where i wll get those ? and in real time we mostly worked on which forms in RE OM PA and PAYROLL modules?Hi,
Transcation code is Pe51.
You can go through these pdf docs....
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_FORMS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYXXFORM/PYINT_FORMBUILDER.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/c8/4cde4fe00811d1953c00a0c9306433/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/c8/4cde4fe00811d1953c00a0c9306433/frameset.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://planetsap.com/index.htm
http://www.atomhr.com/library_full.htm
http://www.sap-basis-abap.com/saphr.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/60/d8d8c7576311d189270000e8322f96/frameset.htm
http://www.sapfriends.com/sapstuff.html
Download the ABAP e-book for HR in the below link under the section 'Free ABAP eBook Download'
http://www.sap-img.com
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
Other links-
http://www.sapgenie.com/sapfunc/index.htm
http://www.sap-img.com/abap/sample-hr-reports-allocate-petrol-allowance.htm
http://www.sap-img.com/hr021.htm
http://www.sap-img.com/human/hr-faq.htm
http://www.sap-img.com/human/finding-the-list-of-hr-module-tables.htm
http://www.atomhr.com/know_preview/Reading_Payroll_Results_with_ABAP.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Payroll
http://www.sap-press.com/product.cfm?account=&product=H967
http://www.sapdevelopment.co.uk/hr/payres_abap.htm
http://www.sapdevelopment.co.uk/hr/payres_tcode.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
You can see some Standard Program examples in this one..
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
SAP HR
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.sap-basis-abap.com/saphr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Transactions
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d5275f575e11d189270000e8322f96/content.htm
http://www.sap-basis-abap.com/saphr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Transactions
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d5275f575e11d189270000e8322f96/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d5275f575e11d189270000e8322f96/content.htm
http://www.saptips.com/Previews/SAPtipsAugust-September2004TableOfContents.pdf
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Transactions
http://help.sap.com/saphelp_46c/helpdata/en/4f/d528be575e11d189270000e8322f96/frameset.htm.
http://www.sap-basis-abap.com/saphr.htm.
http://www.sapgenie.com/faq/hr.htm
http://www.sap-img.com/human/hr-faq.htm
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.sapgenie.com/mysap/mysap_hr.htm
Re: remunaration statement
HR ABAP
/message/1033820#1033820 [original link is broken]
http://sap.ittoolbox.com/groups/career/sap-career/interview-questions-needed-for-sap-hr-528597#
http://www.google.co.in/url?sa=U&start=3&q=http://www.fundoosite.com/interview-questions/type.asp%3FiType%3D72&e=15410
http://www.kyapoocha.com/category/sap-abap-interview-questions/
http://classifieds.sulekha.com/atlanta/clad.aspx?cid=840216&nma=ATL
http://searchsap.techtarget.com/general/0,295582,sid21_gci1091992,00.html
Re: Hr ABAP
Re: HR ABAP FAQS
ABAP HR
http://www.atomhr.com/know_preview/Reading_Payroll_Results_with_ABAP.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Payroll
http://www.sap-press.com/product.cfm?account=&product=H967
http://www.sapdevelopment.co.uk/hr/payres_abap.htm
http://www.sapdevelopment.co.uk/hr/payres_tcode.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
you can see some Standard Program examples in this one..
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://planetsap.com/index.htm
http://www.atomhr.com/library_full.htm
http://www.sap-basis-abap.com/saphr.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/60/d8d8c7576311d189270000e8322f96/frameset.htm
http://www.sapfriends.com/sapstuff.html
Download the ABAP e-book for HR in the below link under the section 'Free ABAP eBook Download'
http://www.sap-img.com
Also have a look at the following links-
http://www.sapgenie.com/sapfunc/index.htm
http://www.sap-img.com/abap/sample-hr-reports-allocate-petrol-allowance.htm
http://www.sap-img.com/hr021.htm
http://www.sap-img.com/human/hr-faq.htm
http://www.sap-img.com/human/finding-the-list-of-hr-module-tables.htm
Reward Points if found helpfull..
Cheers,
Chandra Sekhar. -
hello friends,
i am doing abap query,
i created the
user group in sq03
infoset in sq02
query in sq01
it looks ok,
but it is picking all the items from the table1,
i want it to pick only those data which satisfy one specific condition,
like
vkorg = 'A123' or 'B456'.
audat = anything after feb 04.
likie that.
can some one help.Check with below Link :
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40bec8da-4cd8-2910-27a9-81f5ce10676c
Pls go through the below link.
http://www.sappoint.com/abap/ab4query.pdf
Thanks
Seshu -
Need help in ABAP coding in start routine
Hi,
I have a requriement like
-To take the value of month which is an attribute of category(info Object) for which category value is 1. I need to apply the month obtained as the filter to another info object. I have opted to write this ABAP code in start routine. Can anyone guide me on this code.
Thanks in advance.do you not have an abap-er at your disposal? i don't imagine this to be quick & dirty that can be written without access to your system! some analysis work may also be required before the actual coding can be done...so I wouldn't post the entire functional spec (business requirement) here hoping for a solution; that would be too weird.
Regards. -
Need help in ABAP code to Enhance the Extract Structure ?????
Hi all,
I want to enhance the extract structure to get KBETR & KBRUE fields of KONP table since it didnt allow me to add those fields while creating the generic extractor because of currency key problems. I want to read all KONP records into internal table with KNUMH (Key). Next, I want to fill them into ZZKBETR & ZZKBRUE of Extract Structure ZOXUR40065 in loop.
DATA:
i_t_zrebate like ZOXUR40065 occurs 0 with header line,
reb_tabix like sy-tabix.
TABLES: KONP.
Could you please help me in completing the ABAP code?
Thanks,
Venkat.Hello Manga,
I have included the following code in ZXRSAU01:
WHEN 'ZREBATE'.
PERFORM ZREBATE_EXIT TABLES C_T_DATA.
After Double click on ZREBATE_EXIT on perform statement, it created ZXRSAF01 include and the following code is added in it:
FORM ZREBATE_EXIT TABLES FP_C_T_DATA STRUCTURE ZOXUR40065.
DATA:
i_t_zrebate like ZOXUR40065 occurs 0 with header line,
reb_tabix like sy-tabix.
FIELD-SYMBOLS: <l_c_t_data> TYPE ZOXUR40065.
LOOP AT fp_c_t_data ASSIGNING <l_c_t_data>.
reb_tabix = sy-tabix.
select single KBETR KBRUE
into (<l_c_t_data>-ZZKBETR,
<l_c_t_data>-ZZKBRUE,
from KONP
where KNUMH eq <l_c_t_data>-KNUMH.
if sy-subrc eq 0.
MODIFY fp_c_t_data FROM <l_c_t_data> INDEX reb_tabix.
endif.
CLEAR:reb_tabix.
ENDLOOP.
ENDFORM.
When I tried to Activate this ZXRSAF01 include, it fails with 'The FORM "ZREBATE_EXIT" does not exist'.
Should it be FP_C_T or P_C_T? I found P_C_T in ZXRSAF01 include.
What is wrong with it, please ?
Can't I add this whole code in main include ZXRSAU01itself?
The Extractor ZREBATE is based on KONA, KONH & KONP tables. This Extractor and KONA table have the same 4000 records and KONP has 13000 records. I want to extract KBERT & KBRUE from KONP.
Thanks in advance.
Regards,
Venkat -
I am facing problem in abap program.
Requirement :
i want to print the data like this
delivery no- item- from batch- to batch - material shade- no of cones- netwt- grosswt- no of bags.
delivery no & item from lips-vbeln lips-uecha field table.
against this i will be having no of batch in lips-charg field.
batches may be in order or may not be there.
Against this each batch i will get shade, no of cones, netwt, grosswt, from batch classification.
mch1,ausp table.
on change of any of the above items or batch order i must print it with a new line.
example.
say supose if delivery 100 item 10 contains ABC001 batch to ABC008 batch ,
CDE 009 to CDE010, XYZ012, PQR013 batch.
this batch number contains characters and numeric.
i want to print like this
delivery___item__frombatch__to batch____shade__noofcones__netwt___grosswt____no of bags
100______10____ABC001____ABC008___black__40_________50 kg__50.4 kg_____8
_______________CDE009____CDE010___black__50_________50 kg__50.4 kg_____2
_______________XYZ012_____XYZ012___black__50_________50 kg__50.4 kg_____1
_______________PQR013____PQR013___black__40_________50 kg__50.4 kg_____1
can u any please help me how to build the logic.Hello Navin,
You've got to give control break points within the loop, to fix the problem.
LOOP AT T_TABLE INTO FS_TABLE.
AT NEW FIELDNAME1.
WRITE:/ FS_TABLE-FIELDNAME1.
ENDAT. " AT NEW FIELDNAME1
AT NEW FIELDNAME2.
WRITE:/ FS_TABLE-FIELDNAME2.
ENDAT. " AT NEW FIELDNAME2
* Fieldname3 will be printed below distinct Fieldname2. Fieldname3 is printed as bunch.
WRITE:/ FS_TABLE-FIELDNAME3.
ENDLOOP. " LOOP AT T_TABLE INTO FS_TABLE
Note:
Try giving ON CHANGE OF T_TABLE-FIELDNAME.
This is an obsolete statement, but this really does well, in case of printing Currency or Date.
Usually, date and currency fields are printed
Rs.****.**
LOOP AT T_TABLE INTO FS_TABLE.
ON CHANGE OF FS_TABLE-FIELDNAME1.
WRITE:/ FS_TABLE-FIELDNAME1.
ENDON. " ON CHANGE OF FS_TABLE-FIELDNAME1
ON CHANGE OF FS_TABLE-FIELDNAME2.
WRITE:/ FS_TABLE-FIELDNAME2.
ENDON. " ON CHANGE OF FS_TABLE-FIELDNAME2
WRITE:/ FS_TABLE-FIELDNAME3.
ENDLOOP. " LOOP AT T_TABLE INTO FS_TABLE
Try with the concept above, hope you'll get the solution.
Thankyou,
Zahackson -
hi,
i need to reload the master data without FM, i put the comments on fm and relaod the data, now i having a problem, loading process is slow now as compair to before, when i was using with FM.i checked the manage of infoObject, it is show 1123455 records in "transfer" column and 0 record in "added" column, below is the start routine,
Please help me to fix that problem
IF NOT DATAPAK[] IS INITIAL.
LOOP AT DATAPAK INTO S_DATAPAK.
CLEAR V_INDEX.
V_INDEX = SY-TABIX.
IF S_DATAPAK-/BIC/ABRETPRI CO ' 0123456789.'.
CLEAR: V_AMOUNT, V_PRC.
V_AMOUNT = S_DATAPAK-/BIC/ABRETPRI.
CALL FUNCTION 'RSAR_CURRENCY_CONVERT'
EXPORTING
I_CURRENCY = S_DATAPAK-CURRENCY
CHANGING
C_AMOUNT = V_AMOUNT.
V_PRC = V_AMOUNT.
S_DATAPAK-/BIC/ABRETPRI = V_PRC.
ENDIF.
IF S_DATAPAK-/BIC/ABBLNKFLG IS INITIAL.
S_DATAPAK-/BIC/ABBLNKFLG = 'N'.
ENDIF.
TRANSLATE S_DATAPAK-/BIC/ABSZRANGE TO UPPER CASE
IF S_DATAPAK-CURRENCY IS INITIAL.
S_DATAPAK-CURRENCY = S_DATAPAK-WHLPRCCURR.
MODIFY DATAPAK FROM S_DATAPAK INDEX V_INDEX TRANSPORTING
/BIC/ABRETPRI /BIC/ABWHLPRCE /BIC/ABBLNKFLG
ENDIF.
*ENDLOOP.
ENDIF
ThanksYou need not use start routine to achieve this. Instead you can write transfer routines/formulas for those fields in UR.
-
Need help with ABAP coding using java
Dear experts,
I have used ABAP to code many reports/function modules.However as i know java quite well,i want to achieve the same using java.I have utilized JCO to retrieve information from RFC in this mission.
However i realized that i had to code all things using ABAP and use java only as interface to connect to
SAP fetch that module and display information on console.It was not that fun.
I want that i should not Login to SAP but work only using java.
I heard SAP Netweaver is a good choice.But i dont know much about it.Will i be able to develop reports only by java and how ?
Plz suggest.hi,
I hope that you already have the J2ME Toolkit and that your emulator works okay. In the toolkit you get several examples to show you how to program a MIDlet. One has to do with a HTTP client server connection. Also in the API documentation for the J2ME there is a Connector class that you used to set up this communication and in the description of this class it pretty thoroughly explains how to set up an HTTP protocol client.
However, if you want to do some other kind of networking then you are pretty much out of luck, as the TCPIP socket protocol has not been fully implemented and is optional to the J2ME specifications, only the HTTP protocol is certain to be available. This means that mobile phone companies can add other networking functionality to their phone's java virtual machine if they feel like it. This is a bummer I know.
I hope this helps.
Cheers,
Mark -
Need help on ABAP proxy coding
Hi Friends,
I am working on XI integrating with R/3 and we are using ABAP server proxy. Could any one please help me out in coding in proxy class?
I have two fields comming through XI proxy in to R/3, code should map and store in R/3 table.
Thanks
Rajeev.HI Rajeev,
I am facing the same requirement now... can u explain me how to achieve this?
Thanks in advance
Giri -
Hi All,
I am receiving following while testin ABAP mapping through SXI_MAPPING_TEST. I have configured the data type,message type,service interface,operation mapping ( Abapclass) in ESR and sender/receiver communication channels in ID.
<?xml version="1.0" encoding="iso-8859-1" ?>
- <Top>
<First>BeginTrace</First>
<Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
<Trace level="2" type="T">......attachment XI_Context not found</Trace>
<Trace level="3" type="T">Mapping is determined</Trace>
<Trace level="1" type="T">No mapping configured</Trace>
<Trace level="1" type="E">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
</Top>
emp_node_collection = idocument->get_elements_by_tag_name_ns( name = 'MT_Emp_Det' ).
"MT_Emp_Det" is my source message type.
Below is the xml format,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Emp_Det xmlns:ns0="http://xyztest.com">
<EMPLOYEE>
<PERSONAL>
<EMPID>103</EMPID>
<FIRSTNAME>sari</FIRSTNAME>
<MIDDLENAME>JK</MIDDLENAME>
<LASTNAME>kum</LASTNAME>
<AGE>25</AGE>
<GENDER>M</GENDER>
</PERSONAL>
<JOB>
<COMPANY>HPL</COMPANY>
<DEPARTMENT>PI</DEPARTMENT>
<DESIGNATION>JS</DESIGNATION>
<BEGINDATE>2010</BEGINDATE>
<ENDDATE>9999</ENDDATE>
<SALARY/>
</JOB>
</EMPLOYEE>
</ns0:MT_Emp_Det>
Let me know if I have missed anything.Hi Hari, today I created my first Abap mapping and I have obtained the same trace that you and I created the class as Local object.
Please verify the following:
Verify that all objects are activated, methods, class, etc
Test it with SXI_MAPPING_TEST
Regards. -
Hi All,
I have the data like this and ABC line is the primary object, Inline is the attribute.
ABC Line Inline
GH04 1001
OI04 1031
OU04 1002
OU05 1002
My requirement is like in the report. I have to use the Inline and restrict with the data when I restrict with 1001, 1031 and 1002. But it has to consider 1001, 1031 and 1002 which starts with only OU*. I donu2019t require all ABC lines.
I tried to write the code but I couldnu2019t.
Can any one give the code please?
Thanks
Sravaniif the ABC line item is OU* then you need to display 1001 and 1031 else you want display all the items
I m right???
reach me at
Edited by: shanthi bhaskar on Apr 15, 2010 5:20 PM -
Hi Gurus,
here i hav some complication for displaying data in output.In output I have to show characteristics(ysd-characteristics,,,, ysd is a customized tablehaving fields vbeln, matnr, posnr, characteristics......) of material with respect to sales document number(vbap-vbeln).when I am executing the prog with below SELECT statement----
select distinct
ysd~vbeln
ysdposnr ysdmatnr
ysd~characteristic
vbapposnr vbapmatnr
vbap~arktx
vbap~kwmeng
into corresponding fields of table itab1
from ysd_famd_chrctcs as ysd inner join vbap
on ysdvbeln = vbapvbeln
and ysdposnr = vbapposnr
where vbap~vbeln = p_vbeln.
After looping itab1 it is giving output like below.
-->>
Sr | MatNum | MatDesc | Charecteristics | Quantity
no | | | |
1 | 00000012 | CCslab | Moisture | 50
1 | 00000012 | CCslab | over size | 50
1 | 00000012 | CCslab | under size | 50
1 | 00000012 | CCslab | phos percnt | 50
1 | 00000012 | CCslab | chrome | 50
1 | 00000012 | CCslab | Ferrous | 50
but output should be like below
-->>
Sr | MatNum | MatDesc | Charecteristics | Quantity
no | | | |
1 | 00000012 | CCslab | Moisture | 50
| over size |
| under size |
| phos percnt |
| chrome |
| Ferrous |
what should i write with select statement to get this.
I tried using DELETE ADJACENT...... but it is deletin all characteristics from output.
pls help...
Regard
SaifHi,
You can make use of AT NEW .... ENDAT statements.
Declare another internal table ITAB2 & its corresponding work area.
Refer the below code:
Loop at ITAB1 INTO WA_ITAB1.
CLEAR F_FLAG.
AT NEW MATNR.
WA_ITAB2-MATNR = WA_ITAB1-MATNR.
WA_ITAB2-DESC = WA_ITAB1-DESC.
similarly do the same for other fields...
f_flag = 1.
ENDAT.
IF f_flag NE '1'.
WA_ITAB2-MATNR = SPACE.
WA_ITAB2-DESC = SPACE.
WA_ITAB2-CHAR = WA_ITAB1-CHAR.
ENDIF.
APPEND WA_ITAB2 TO ITAB2.
CLEAR WA_ITAB2.
ENDLOOP.
Just try and see.
reward points if useful.
Thanks,
Asha -
Hi Friends,
I have requirement to transport query, Infoset from one client other client.
How can i achieve that?
Pls send some answers.
Regards
Jagadeeshwar.BHi,
Check these links-
Transport from one client to another client
Re: request transfer to one client to another client -
Need Help With Simple ABAP Code
Hello,
I'm loading data from a DSO (ZDTBMAJ) to an Infocube (ZCBRAD06). I need help with ABAP code to some of the logic in Start Routine. DSO has 2 fields: ZOCTDLINX & ZOCBRDMAJ.
1. Need to populate ZOCPRODCD & ZOCREFNUM fields in Infocube:
Logic:-
Lookup /BI0/PMATERIAL, if /BIC/ZOCBRDMAJ = /BIC/OIZOCBRDMAJ
then /BIC/ZOCPRODCD = ZOCPRODCD in Infocube
/BIC/ZOCREFNUM = ZOCREFNUM in Infocube
2. Need to populate 0G_CWWTER field in Infocube:
Logic:
Lookup /BIC/PZOCTDLINX, if /BIC/ZOCTDLINX = BIC/OIZOCTDLINX
then G_CWWTER = 0G_CWWTER in Infocube.
I would need to read single row at a time.
Thanks!I resolved it.
-
Hi everyone,
I am a newbie to ABAP. I have a requirement, wherein, I need to develop a program that takes another program name as a variant and calculate the time for execution for the program, given as variant. Please somebody help me with it. Thanks in advance.This does not make sense for background jobs, and for dialog processes there is a system parameter that limits the maximum allowed runtime, after which the process gets cancelled with a TIME_OUT short dump. This is usually set to 5 or 10 minutes.
Who should see this pop-up anyway, and what should be the follow-on action after seeing it?
Thomas
P.S. in the future, please use more meaningful subject lines for your posts, as most people here need "help on ABAP report"
Maybe you are looking for
-
My dvi to video adapter worked fine at first, when I connected to my CRT TVs. Now it is in black and white and the vertical hold keeps flipping. Tried it on two TVs same results. Tried rebooting same thing after the logon page. Help please
-
Exporting Canon 5D Mark ii footage..
I'm fairly new to final cut, im running a Mac Pro, 2 X 3 Ghz processor, 10GB memory, 10.6.2 snow leopard... and i still find myself having to render at every edit in the timeline, and now im having trouble figuring out how to export correctly to get
-
Quicktime problem! {HELP} ASAP
HELP:I was going to take an audio recording in quicktime and i pressed screen recording instead. But i stopped it adn it's saying finishing and it's been like that for about 3 and a half hours. I have tried to forcequit and restart neither worked. HE
-
Folder settings lost after iTunes update
I updated my iTunes to v10 today and wanted to sync my apps but iTunes wants to erase all of my apps and rebuild whole database again which means I have recreate all of my folders and arrange all of my apps again. I have no intention to do that. Is t
-
I try 2 way 1st time update from app store and not work 2nd time I delete motion from Applications to trash and fresh install and not work again how to fix?