SD ABAP Code.
SD ABAP Code.
SD ABAP Code.
TYPE-POOLS: slis .
BEGIN OF ty_mseg,
mblnr TYPE mkpf-mblnr,
mjahr TYPE mkpf-mjahr,
zeile TYPE mseg-zeile,
bwart TYPE mseg-bwart,
xauto TYPE mseg-xauto,
matnr TYPE mseg-matnr,
werks TYPE mseg-werks,
lgort TYPE mseg-lgort,
charg TYPE mseg-charg,
kunnr TYPE mseg-kunnr,
menge TYPE mseg-menge,
meins TYPE mseg-meins,
ebeln TYPE mseg-ebeln,
sjahr TYPE mseg-sjahr,
smbln TYPE mseg-smbln,
smblp TYPE mseg-smblp,
wempf TYPE mseg-wempf,
bukrs TYPE mseg-bukrs,
prctr TYPE mseg-prctr,
xblnr_mkpf TYPE xblnr, "aer01
flag TYPE char1 ,
END OF ty_mseg,
BEGIN OF ty_vbfa,
vbelv TYPE vbfa-vbelv,
posnv TYPE vbfa-posnv,
vbeln TYPE vbfa-vbeln,
posnn TYPE vbfa-posnn,
vbtyp_n TYPE vbtyp_n, "aer01
erdat TYPE vbfa-erdat,
END OF ty_vbfa,
BEGIN OF ty_lips,
vbeln TYPE lips-vbeln,
posnr TYPE lips-posnr,
erdat TYPE lips-erdat,
matnr TYPE lips-matnr,
lgort TYPE lips-lgort,
charg TYPE lips-charg,
lfimg TYPE lips-lfimg, "aer01
arktx TYPE lips-arktx,
vgbel TYPE lips-vgbel,
vgpos TYPE lips-vgpos,
spart TYPE lips-spart,
END OF ty_lips,
BEGIN OF ty_likp,
vbeln TYPE likp-vbeln,
lfart TYPE likp-lfart,
route TYPE likp-route,
wadat_ist TYPE likp-wadat_ist,
END OF ty_likp,
BEGIN OF ty_aufm,
mblnr TYPE aufm-mblnr,
mjahr TYPE aufm-mjahr,
matnr TYPE aufm-matnr,
werks TYPE aufm-werks,
charg TYPE aufm-charg,
flag TYPE char1,
END OF ty_aufm,
BEGIN OF ty_t001w,
werks TYPE t001w-werks,
name1 TYPE t001w-name1,
regio TYPE t001w-regio,
END OF ty_t001w,
BEGIN OF ty_lfa1,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF ty_lfa1,
BEGIN OF ty_vttk,
tknum TYPE vttk-tknum,
signi TYPE vttk-signi,
tdlnr TYPE vttk-tdlnr,
text1 TYPE vttk-text1,
text2 TYPE vttk-text2,
text3 TYPE vttk-text3,
END OF ty_vttk,
BEGIN OF ty_setleaf,
setname TYPE setleaf-setname,
lineid TYPE setleaf-lineid,
valfrom TYPE setleaf-valfrom,
END OF ty_setleaf,
BEGIN OF ty_setlinet,
setname TYPE setlinet-setname,
lineid TYPE setlinet-lineid,
descript TYPE setlinet-descript,
END OF ty_setlinet,
BEGIN OF ty_mcha,
matnr TYPE mcha-matnr,
werks TYPE mcha-werks,
charg TYPE mcha-charg,
flag TYPE char1 ,
END OF ty_mcha,
BEGIN OF ts_kna1,
kunnr TYPE kunnr,
name1 TYPE name1_gp,
name2 TYPE name2_gp,
ort01 TYPE ort01_gp,
pstlz TYPE pstlz,
regio TYPE regio,
stras TYPE stras_gp,
END OF ts_kna1,
BEGIN OF ts_j_1imocust,
kunnr TYPE kunnr,
j_1ilstno TYPE j_1ilstno,
END OF ts_j_1imocust,
BEGIN OF ts_vbrp,
vbeln TYPE vbeln_vf,
posnr TYPE posnr_vf,
vgbel TYPE vgbel,
vgpos TYPE vgpos,
aubel TYPE vbeln_va,
aupos TYPE posnr_va,
spart TYPE spart,
shkzg TYPE shkzg_vf,
flag TYPE char1,
END OF ts_vbrp,
BEGIN OF ts_vbrk,
vbeln TYPE vbeln_vf,
fkart TYPE fkart,
vkorg TYPE vkorg,
fkdat TYPE fkdat,
knumv TYPE knumv,
fksto TYPE fksto,
END OF ts_vbrk,
BEGIN OF ts_konv,
knumv TYPE knumv,
kposn TYPE kposn,
stunr TYPE stunr,
zaehk TYPE dzaehk,
kschl TYPE kscha,
kbetr TYPE kbetr,
kwert TYPE kwert,
END OF ts_konv,
BEGIN OF ts_final_inv,
vgbel TYPE lips-vgbel,
vgpos TYPE lips-vgpos,
vbeln TYPE lips-vbeln,
posnr TYPE lips-posnr,
lfart TYPE likp-lfart,
erdat TYPE lips-erdat,
werks TYPE mseg-werks,
kunnr TYPE mseg-kunnr,
name1 TYPE char100,
address TYPE char100,
cust_reg TYPE regio,
j_1ilstno TYPE j_1ilstno,
route TYPE likp-route,
spart TYPE lips-spart,
matnr TYPE mseg-matnr,
arktx TYPE lips-arktx,
prctr TYPE mseg-prctr,
lgort TYPE lips-lgort,
charg TYPE mseg-charg,
werks1 TYPE aufm-werks,
regio TYPE t001w-regio,
menge TYPE mseg-menge,
meins TYPE mseg-meins,
wadat_ist TYPE likp-wadat_ist,
bill_doc TYPE vbeln_vf,
fkart TYPE fkart,
fkdat TYPE fkdat,
vkorg TYPE vkorg,
bas_val TYPE dmbtr,
r_dis TYPE dmbtr,
net_val TYPE dmbtr,
tax_typ TYPE kscha,
tax1 TYPE kbetr,
tax1_amt TYPE dmbtr,
tax2 TYPE kbetr,
tax2_amt TYPE dmbtr,
dev TYPE kbetr,
dev_amt TYPE dmbtr,
tax4 TYPE kbetr,
tax4_amt TYPE dmbtr,
tot_tax TYPE dmbtr,
tot_amt TYPE dmbtr,
END OF ts_final_inv.
SELECTION-SCREEN SKIP 1.
AT SELECTION-SCREEN.
START-OF-SELECTION .
*&fetching material doc Header data
PERFORM sub_get_mkpf.
IF r_k2 = c_x.
PERFORM sub_get_cust_details.
PERFORM sub_get_vbrk_vbrp.
ENDIF.
*&---------------------------------------------------------------------*
*& Form SUB_VAL_PLANTS
*&---------------------------------------------------------------------*
*& validating source , supply plants and division
*----------------------------------------------------------------------*
FORM sub_val_plants .
DATA : w_werks TYPE t001w-werks.
CLEAR w_werks.
SELECT SINGLE werks
FROM t001w
INTO w_werks
WHERE werks IN s_plnt_d. "#EC *
IF sy-subrc <> 0.
MESSAGE e000 WITH text-002. "Enter valid Receiving plant
ENDIF.
ENDFORM. " SUB_VAL_PLANTS
*&---------------------------------------------------------------------*
*& Form SUB_GET_MKPF
*&---------------------------------------------------------------------*
*&fetching material doc data
*----------------------------------------------------------------------*
FORM sub_get_mkpf .
SELECT mblnr
mjahr
vgart
blart
budat
xblnr
FROM mkpf
INTO TABLE it_mkpf
WHERE budat IN s_date .
IF sy-subrc <> 0.
MESSAGE i000 WITH text-004. "No data found
LEAVE LIST-PROCESSING .
ELSE .
DELETE it_mkpf WHERE blart NE c_mwl.
ENDIF.
ENDFORM. " SUB_GET_MKPF
*&---------------------------------------------------------------------*
*& Form SUB_GET_MSEG
*&---------------------------------------------------------------------*
*&fetching material doc item data
*----------------------------------------------------------------------*
FORM sub_get_mseg .
IF r_k2 = c_x.
SELECT mblnr
mjahr
zeile
bwart
xauto
matnr
werks
lgort
charg
kunnr
menge
meins
ebeln
sjahr
smbln
smblp
wempf
bukrs
prctr
xblnr_mkpf "aer01
FROM mseg
INTO TABLE it_mseg
FOR ALL ENTRIES IN it_mkpf
WHERE mblnr = it_mkpf-mblnr
AND mjahr = it_mkpf-mjahr
AND bwart IN (641,642,941,942) .
IF sy-subrc = 0.
DELETE it_mseg WHERE werks = 'FEXP' OR
menge IS INITIAL OR
bukrs NE 'FBD' OR
lgort NE 'BRND' OR
xauto = c_x.
SELECT mblnr
mjahr
zeile
bwart
xauto
matnr
werks
lgort
charg
kunnr
menge
meins
ebeln
sjahr
smbln
smblp
wempf
bukrs
prctr
xblnr_mkpf "aer01
FROM mseg
INTO TABLE it_mseg
FOR ALL ENTRIES IN it_mkpf
WHERE mblnr = it_mkpf-mblnr
AND mjahr = it_mkpf-mjahr
AND bwart IN (601,602) .
IF sy-subrc = 0.
DELETE it_mseg WHERE werks = 'FEXP' OR
menge IS INITIAL OR
bukrs NE 'FBD' OR
lgort NE 'BRND' OR
xauto = c_x.
SELECT mblnr
mjahr
zeile
bwart
xauto
matnr
werks
lgort
charg
kunnr
menge
meins
ebeln
sjahr
smbln
smblp
wempf
bukrs
prctr
xblnr_mkpf "aer01
FROM mseg
INTO TABLE it_mseg
FOR ALL ENTRIES IN it_mkpf
WHERE mblnr = it_mkpf-mblnr
AND mjahr = it_mkpf-mjahr
AND bwart IN (601,602,651,652).
IF sy-subrc = 0.
IF it_mseg IS INITIAL.
MESSAGE i000 WITH text-004 . " NO DATA FOUND
LEAVE LIST-PROCESSING .
ENDIF.
ENDIF.
ENDIF.
CLEAR is_mseg .
READ TABLE it_mseg INTO is_mseg WITH KEY mblnr = is_mkpf-mblnr
mjahr = is_mkpf-mjahr BINARY
SEARCH.
IF sy-subrc <> 0.
is_mkpf-flag = c_x .
MODIFY it_mkpf FROM is_mkpf TRANSPORTING flag.
ELSE.
is_mkpf-vbeln = is_mkpf-xblnr .
MODIFY it_mkpf FROM is_mkpf TRANSPORTING vbeln .
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
IF r_k2 = c_x.
SELECT vbelv
posnv
vbeln
posnn
erdat
FROM vbfa
INTO TABLE it_vbfa
FOR ALL ENTRIES IN it_mkpf
WHERE vbelv = it_mkpf-vbeln
AND vbtyp_n = c_doc_cat .
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " SUB_GET_LFA1
*&---------------------------------------------------------------------*
*& Form SUB_GET_LIPS
*&---------------------------------------------------------------------*
*&fetching delivery data
*----------------------------------------------------------------------*
FORM sub_get_lips .
IF it_mkpf IS NOT INITIAL.
SELECT vbeln
posnr
erdat
matnr
lgort
charg
arktx
vgbel
vgpos
spart
FROM lips
INTO TABLE it_lips
FOR ALL ENTRIES IN it_mkpf
WHERE vbeln = it_mkpf-vbeln .
IF sy-subrc = 0.
DELETE it_lips WHERE spart NOT IN s_spart .
IF it_lips IS INITIAL.
MESSAGE i000 WITH text-100 . "no data found for the given division
LEAVE LIST-PROCESSING .
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " SUB_GET_LIPS
*&---------------------------------------------------------------------*
*& Form SUB_GET_T001W
*&---------------------------------------------------------------------*
*&fetching plant description.
*----------------------------------------------------------------------*
FORM sub_get_t001w .
IF it_mseg IS NOT INITIAL.
SELECT werks
name1
regio
FROM t001w
INTO TABLE it_t001w
FOR ALL ENTRIES IN it_mseg
WHERE werks = it_mseg-werks
OR werks = it_mseg-wempf+0(4).
ENDIF.
ENDFORM. " SUB_GET_T001W
*&---------------------------------------------------------------------*
*& Form SUB_GET_LIKP
*&---------------------------------------------------------------------*
*&fetching delivery header data.
*----------------------------------------------------------------------*
FORM sub_get_likp .
ENDIF.
SELECT vbeln
posnr
erdat
matnr
lgort
charg
lfimg "aer01
arktx
vgbel
vgpos
spart
FROM lips
INTO TABLE it_lips
FOR ALL ENTRIES IN it_likp
WHERE vbeln = it_likp-vbeln .
IF sy-subrc = 0.
IF it_lips IS INITIAL.
MESSAGE i000 WITH text-100 . "no data found for the given division
LEAVE LIST-PROCESSING .
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " SUB_GET_LIPS2
*&---------------------------------------------------------------------*
*& Form SUB_GET_AUFM
*&---------------------------------------------------------------------*
*&fetching data from aufm table
*----------------------------------------------------------------------*
FORM sub_get_mcha .
SELECT setname
lineid
descript
FROM setlinet
INTO TABLE it_setlinet
WHERE setclass = c_class
AND setname = c_setname
AND descript IN s_spart .
IF sy-subrc = 0.
SELECT setname
lineid
valfrom
FROM setleaf
INTO TABLE it_setleaf
FOR ALL ENTRIES IN it_setlinet
WHERE setclass = c_class
AND setname = c_setname
AND lineid = it_setlinet-lineid.
ENDIF.
SELECT
matnr
werks
charg
FROM mcha
INTO TABLE it_mcha
FOR ALL ENTRIES IN lt_mseg
WHERE matnr = lt_mseg-matnr
AND charg = lt_mseg-charg.
IF sy-subrc = 0.
SORT it_setleaf BY valfrom .
CLEAR is_t001w.
READ TABLE it_t001w INTO is_t001w WITH KEY werks = is_mseg-werks BINARY SEARCH.
IF sy-subrc = 0.
is_final_k2-name_srp = is_t001w-name1.
ENDIF.
CLEAR is_t001w.
READ TABLE it_t001w INTO is_t001w WITH KEY werks = is_mseg-wempf+0(4) BINARY
SEARCH.
IF sy-subrc = 0.
is_final_k2-name_dsp = is_t001w-name1.
ENDIF.
CLEAR is_mkpf.
READ TABLE it_mkpf INTO is_mkpf WITH KEY mblnr = is_mseg-mblnr
mjahr = is_mseg-mjahr BINARY SEARCH.
IF sy-subrc = 0.
is_final_k2-vbeln = is_mkpf-vbeln. "delivery no
CLEAR is_vbfa.
READ TABLE it_vbfa INTO is_vbfa WITH KEY vbelv = is_mkpf-vbeln BINARY
SEARCH .
IF sy-subrc = 0.
is_final_k2-vbelv = is_vbfa-vbeln. "shipment no
is_final_k2-erdat = is_vbfa-erdat.
ENDIF.
CLEAR is_lips.
READ TABLE it_lips INTO is_lips WITH KEY vbeln = is_mkpf-vbeln
matnr = is_mseg-matnr BINARY SEARCH
.
IF sy-subrc = 0.
is_final_k2-spart = is_lips-spart.
is_final_k2-arktx = is_lips-arktx.
ENDIF.
ENDIF.
CLEAR is_vttk.
READ TABLE it_vttk INTO is_vttk WITH KEY tknum = is_final_k2-vbelv BINARY
SEARCH.
IF sy-subrc = 0 .
is_final_k2-signi = is_vttk-signi.
is_final_k2-text3 = is_vttk-text3.
is_final_k2-text2 = is_vttk-text2.
is_final_k2-text1 = is_vttk-text1.
CLEAR is_lfa1.
READ TABLE it_lfa1 INTO is_lfa1 WITH KEY lifnr = is_vttk-tdlnr BINARY
SEARCH .
IF sy-subrc = 0.
is_final_k2-name_vnd = is_lfa1-name1. "vendor name
ENDIF.
ENDIF.
is_final-menge = is_mseg-menge.
is_final-meins = is_mseg-meins.
is_final-charg = is_mseg-charg.
is_final-werks = is_mseg-werks.
is_final-kunnr = is_mseg-kunnr.
is_final-matnr = is_mseg-matnr.
is_final-prctr = is_mseg-prctr.
CLEAR is_mkpf.
READ TABLE it_mkpf INTO is_mkpf WITH KEY mblnr = is_mseg-mblnr
mjahr = is_mseg-mjahr BINARY SEARCH .
IF sy-subrc = 0.
CLEAR is_likp.
READ TABLE it_likp INTO is_likp WITH KEY vbeln = is_mkpf-vbeln BINARY
SEARCH .
IF sy-subrc = 0.
is_final-wadat_ist = is_likp-wadat_ist.
is_final-route = is_likp-route.
is_final-lfart = is_likp-lfart.
ENDIF.
CLEAR is_lips.
READ TABLE it_lips INTO is_lips WITH KEY vbeln = is_likp-vbeln
matnr = is_mseg-matnr BINARY
SEARCH .
IF sy-subrc = 0 .
is_final-vgbel = is_lips-vgbel.
is_final-vgpos = is_lips-vgpos.
is_final-spart = is_lips-spart.
is_final-vbeln = is_lips-vbeln.
is_final-erdat = is_lips-erdat.
is_final-arktx = is_lips-arktx.
is_final-lgort = is_lips-lgort.
ENDIF.
ENDIF.
*&append final table.
APPEND is_final TO it_final.
CLEAR is_final .
ENDLOOP.
ENDFORM. " SUB_PRE_FINAL_K1_K3
*&---------------------------------------------------------------------*
*& Form SUB_PRE_FINAL_PRD
*&---------------------------------------------------------------------*
FORM sub_pre_final_prd .
is_final-menge = is_mseg-menge.
is_final-meins = is_mseg-meins.
is_final-charg = is_mseg-charg.
is_final-werks = is_mseg-werks.
is_final-kunnr = is_mseg-kunnr.
is_final-matnr = is_mseg-matnr.
is_final-prctr = is_mseg-prctr.
CLEAR is_mkpf.
READ TABLE it_mkpf INTO is_mkpf WITH KEY mblnr = is_mseg-mblnr
mjahr = is_mseg-mjahr
BINARY SEARCH .
IF sy-subrc = 0.
CLEAR is_likp.
READ TABLE it_likp INTO is_likp WITH KEY vbeln = is_mkpf-vbeln BINARY
SEARCH .
IF sy-subrc = 0.
is_final-wadat_ist = is_likp-wadat_ist.
is_final-route = is_likp-route.
is_final-lfart = is_likp-lfart.
ENDIF.
CLEAR is_lips.
READ TABLE it_lips INTO is_lips WITH KEY vbeln = is_likp-vbeln
matnr = is_mseg-matnr BINARY
SEARCH .
IF sy-subrc = 0 .
is_final-vgbel = is_lips-vgbel.
is_final-vgpos = is_lips-vgpos.
is_final-spart = is_lips-spart.
is_final-vbeln = is_lips-vbeln.
is_final-erdat = is_lips-erdat.
is_final-arktx = is_lips-arktx.
is_final-lgort = is_lips-lgort.
ENDIF.
ENDIF.
CLEAR is_mcha.
READ TABLE it_mcha INTO is_mcha WITH KEY matnr = is_mseg-matnr
charg = is_mseg-charg BINARY SEARCH.
IF sy-subrc = 0 .
is_final-werks1 = is_mcha-werks. "manufacturer plant
CLEAR is_t001w.
READ TABLE it_t001w INTO is_t001w WITH KEY werks = is_mcha-werks BINARY
SEARCH .
IF sy-subrc = 0.
is_final-regio = is_t001w-regio.
ENDIF.
ENDIF.
***append final table.
APPEND is_final TO it_final.
CLEAR is_final.
ENDLOOP.
ENDFORM. " SUB_PRE_FINAL_PRD
*&---------------------------------------------------------------------*
*& Form SUB_DISPLAY
*&---------------------------------------------------------------------*
*& display final table.
*----------------------------------------------------------------------*
FORM sub_display .
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-012.
is_fcat-fieldname = text-013.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-014.
is_fcat-fieldname = text-015.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-016.
is_fcat-fieldname = text-017.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-018.
is_fcat-fieldname = text-019.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-020.
is_fcat-fieldname = text-021.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-022.
is_fcat-fieldname = text-023.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-024.
is_fcat-fieldname = text-025.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-026.
is_fcat-fieldname = text-027.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-028.
is_fcat-fieldname = text-029.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-030.
is_fcat-fieldname = text-031.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-032.
is_fcat-fieldname = text-033.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-034.
is_fcat-fieldname = text-035.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-036.
is_fcat-fieldname = text-037.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-038.
is_fcat-fieldname = text-039.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-040.
is_fcat-fieldname = text-041.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-042.
is_fcat-fieldname = text-043.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-seltext_m = text-044.
is_fcat-fieldname = text-045.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
ENDFORM. " SUB_PRE_FCAT
*&---------------------------------------------------------------------*
*& Form SUB_PRE_FCAT_K1_K3
*&---------------------------------------------------------------------*
*&building field catalog.
*----------------------------------------------------------------------*
FORM sub_pre_fcat_k1_k3 .
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-050.
is_fcat-seltext_m = text-051.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-052.
is_fcat-seltext_m = text-053.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-054.
is_fcat-seltext_m = text-055.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-056.
is_fcat-seltext_m = text-057.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-058.
is_fcat-seltext_m = text-059.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-060.
is_fcat-seltext_m = text-061.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-062.
is_fcat-seltext_m = text-063.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-064.
is_fcat-seltext_m = text-065.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-066.
is_fcat-seltext_m = text-067.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-068.
is_fcat-seltext_m = text-069.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-070.
is_fcat-seltext_m = text-071.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-072.
is_fcat-seltext_m = text-073.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-074.
is_fcat-seltext_m = text-075.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
IF r_prd = c_x.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-082.
is_fcat-seltext_m = text-083.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-084.
is_fcat-seltext_m = text-085.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
ENDIF.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-076.
is_fcat-seltext_m = text-077.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-078.
is_fcat-seltext_m = text-079.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-080.
is_fcat-seltext_m = text-081.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
is_layout-zebra = c_x .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-003. "Enter valid division
ENDIF.
*&---------------------------------------------------------------------*
*& Form SUB_PRE_FINAL_PRD1
*&---------------------------------------------------------------------*
FORM sub_pre_final_prd1.
SELECT vbelv
posnv
vbeln
posnn
vbtyp_n
erdat
FROM vbfa
INTO TABLE it_vbfa
FOR ALL ENTRIES IN it_mseg
WHERE vbeln = it_mseg-mblnr
AND vbtyp_v IN ('J','T').
IF sy-subrc = 0.
DELETE it_vbfa WHERE vbtyp_n NE 'R'.
SORT it_vbfa BY vbelv posnv.
DELETE ADJACENT DUPLICATES FROM it_vbfa COMPARING vbelv posnv.
SORT it_vbfa BY vbeln posnn.
ENDIF.
ENDIF.
is_final-menge = is_mseg-menge.
is_final-meins = is_mseg-meins.
is_final-charg = is_mseg-charg.
is_final-werks = is_mseg-werks.
is_final-kunnr = is_mseg-kunnr.
is_final-matnr = is_mseg-matnr.
is_final-prctr = is_mseg-prctr.
CLEAR is_mkpf.
READ TABLE it_mkpf INTO is_mkpf WITH KEY mblnr = is_mseg-mblnr
mjahr = is_mseg-mjahr
BINARY SEARCH .
IF sy-subrc = 0.
CLEAR is_likp.
READ TABLE it_likp INTO is_likp WITH KEY vbeln = is_mkpf-vbeln BINARY
SEARCH .
IF sy-subrc = 0.
is_final-wadat_ist = is_likp-wadat_ist.
is_final-route = is_likp-route.
is_final-lfart = is_likp-lfart.
ENDIF.
ENDIF.
CLEAR is_vbfa.
READ TABLE it_vbfa INTO is_vbfa WITH KEY vbeln = is_mseg-mblnr
posnn = is_mseg-zeile
BINARY SEARCH.
IF sy-subrc = 0.
CLEAR is_lips.
READ TABLE it_lips INTO is_lips WITH KEY vbeln = is_vbfa-vbelv
posnr = is_vbfa-posnv BINARY
SEARCH .
IF sy-subrc = 0 .
is_final-vgbel = is_lips-vgbel.
is_final-vgpos = is_lips-vgpos.
is_final-spart = is_lips-spart.
is_final-vbeln = is_lips-vbeln.
is_final-posnr = is_lips-posnr.
is_final-erdat = is_lips-erdat.
is_final-arktx = is_lips-arktx.
is_final-lgort = is_lips-lgort.
ENDIF.
ENDIF.
CLEAR is_mcha.
READ TABLE it_mcha INTO is_mcha WITH KEY matnr = is_mseg-matnr
charg = is_mseg-charg BINARY SEARCH.
IF sy-subrc = 0 .
is_final-werks1 = is_mcha-werks. "manufacturer plant
CLEAR is_t001w.
READ TABLE it_t001w INTO is_t001w WITH KEY werks = is_mcha-werks BINARY
SEARCH .
IF sy-subrc = 0.
is_final-regio = is_t001w-regio.
ENDIF.
ENDIF.
ENDLOOP.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-050.
is_fcat-seltext_m = text-051.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-052.
is_fcat-seltext_m = text-053.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-054.
is_fcat-seltext_m = text-055.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-056.
is_fcat-seltext_m = text-057.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-058.
is_fcat-seltext_m = text-059.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'NAME1'.
is_fcat-seltext_m = 'Customer Name'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'ADDRESS'.
is_fcat-seltext_m = 'Customer Address'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'CUST_REG'.
is_fcat-seltext_m = 'Customer Region'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'J_1ILSTNO'.
is_fcat-seltext_m = 'Customer TIN / LST Number'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-062.
is_fcat-seltext_m = text-063.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-060.
is_fcat-seltext_m = text-061.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-072.
is_fcat-seltext_m = text-073.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-064.
is_fcat-seltext_m = text-065.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-066.
is_fcat-seltext_m = text-067.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-068.
is_fcat-seltext_m = text-069.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-070.
is_fcat-seltext_m = text-071.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-074.
is_fcat-seltext_m = text-075.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-082.
is_fcat-seltext_m = 'Mfg. Plant'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-084.
is_fcat-seltext_m = 'Mfg. Plant Rg'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-076.
is_fcat-seltext_m = text-077.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-078.
is_fcat-seltext_m = text-079.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = text-080.
is_fcat-seltext_m = text-081.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'BILL_DOC'.
is_fcat-seltext_m = 'Invoice No'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'FKART'.
is_fcat-seltext_m = 'Billing Type'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'FKDAT'.
is_fcat-seltext_m = 'Invoice Date'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'VKORG'.
is_fcat-seltext_m = 'Sales Org'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'SPART'.
is_fcat-seltext_m = 'Division'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'BAS_VAL'.
is_fcat-seltext_m = 'Base Value'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'R_DIS'.
is_fcat-seltext_m = 'Rebates/Discounts'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'NET_VAL'.
is_fcat-seltext_m = 'Net Value'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TAX_TYP'.
is_fcat-seltext_m = 'Tax type (VAT/CST)'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TAX1'.
is_fcat-seltext_m = 'Tax1 rate'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TAX1_AMT'.
is_fcat-seltext_m = 'Tax1 Amount'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TAX2'.
is_fcat-seltext_m = 'Tax2 rate'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TAX2_AMT'.
is_fcat-seltext_m = 'Tax2 Amount'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'DEV'.
is_fcat-seltext_m = 'Dev Tax rate'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'DEV_AMT'.
is_fcat-seltext_m = 'Dev Tax Amount'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TAX4'.
is_fcat-seltext_m = 'Tax4 rate'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TAX4_AMT'.
is_fcat-seltext_m = 'Tax4 Amount'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TOT_TAX'.
is_fcat-seltext_m = 'Total Tax Amount'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
w_count = w_count + 1 .
is_fcat-col_pos = w_count .
is_fcat-fieldname = 'TOT_AMT'.
is_fcat-seltext_m = 'Total Amount'.
APPEND is_fcat TO it_fcat.
CLEAR is_fcat.
SELECT kunnr
name1
name2
ort01
pstlz
regio
stras
INTO TABLE it_kna1
FROM kna1
FOR ALL ENTRIES IN it_final
WHERE kunnr = it_final-kunnr.
IF sy-subrc = 0.
SORT it_kna1 BY kunnr.
ENDIF.
SELECT kunnr
j_1ilstno
FROM j_1imocust
INTO TABLE it_j_1imocust
FOR ALL ENTRIES IN it_final
WHERE kunnr = it_final-kunnr.
IF sy-subrc = 0.
SORT it_j_1imocust BY kunnr.
ENDIF.
ENDIF.
SELECT vbeln
posnr
vgbel
vgpos
aubel
aupos
spart
shkzg
FROM vbrp
INTO TABLE it_vbrp
FOR ALL ENTRIES IN it_final
WHERE aubel = it_final-vgbel
AND aupos = it_final-vgpos.
IF sy-subrc = 0.
SELECT vbeln
fkart
vkorg
fkdat
knumv
fksto
FROM vbrk
INTO TABLE it_vbrk
FOR ALL ENTRIES IN it_vbrp
WHERE vbeln = it_vbrp-vbeln.
IF sy-subrc = 0.
w_tabix = sy-tabix.
CLEAR is_vbrk.
READ TABLE it_vbrk INTO is_vbrk WITH KEY vbeln = is_vbrp-vbeln
BINARY SEARCH.
IF sy-subrc = 0.
is_vbrp-flag = 'X'.
ENDIF.
CLEAR is_vbrp.
ENDLOOP.
SELECT knumv
kposn
stunr
zaehk
kschl
kbetr
kwert
FROM konv
INTO TABLE it_konv
FOR ALL ENTRIES IN it_vbrk
WHERE knumv = it_vbrk-knumv.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
w_tabix = sy-tabix.
CLEAR is_vbrp.
READ TABLE it_vbrp INTO is_vbrp WITH KEY aubel = is_final-vgbel
aupos = is_final-vgpos
BINARY SEARCH.
IF sy-subrc = 0.
is_final-flag = 'X'.
ENDIF.
CLEAR is_final.
ENDLOOP.
CLEAR : is_final,is_final_inv.
ENDLOOP.
w_tabix = sy-tabix.
CLEAR is_kna1.
READ TABLE it_kna1 INTO is_kna1 WITH KEY kunnr = is_final_inv-kunnr BINARY
SEARCH.
IF sy-subrc = 0.
CONCATENATE is_kna1-name1 is_kna1-name2 INTO is_final_inv-name1.
CONCATENATE is_kna1-stras is_kna1-ort01 is_kna1-regio is_kna1-pstlz INTO
is_final_inv-address.
is_final_inv-cust_reg = is_kna1-regio.
ENDIF.
CLEAR is_j_1imocust.
READ TABLE it_j_1imocust INTO is_j_1imocust WITH KEY kunnr = is_final_inv-kunnr
BINARY SEARCH.
IF sy-subrc = 0.
CONDENSE is_j_1imocust-j_1ilstno.
is_final_inv-j_1ilstno = is_j_1imocust-j_1ilstno.
ENDIF.
CLEAR is_vbrp.
READ TABLE it_vbrp INTO is_vbrp WITH KEY aubel = is_final_inv-vgbel
aupos = is_final_inv-vgpos
BINARY SEARCH.
is_final_inv-spart = is_vbrp-spart.
IF sy-subrc = 0.
CLEAR is_vbrk.
READ TABLE it_vbrk INTO is_vbrk WITH KEY vbeln = is_vbrp-vbeln
BINARY SEARCH.
IF sy-subrc = 0.
is_final_inv-bill_doc = is_vbrk-vbeln.
is_final_inv-fkart = is_vbrk-fkart.
is_final_inv-fkdat = is_vbrk-fkdat.
is_final_inv-vkorg = is_vbrk-vkorg.
CLEAR is_konv.
READ TABLE it_konv INTO is_konv WITH KEY knumv = is_vbrk-knumv
kposn = is_vbrp-posnr
kschl = 'ZINV'
BINARY SEARCH.
IF sy-subrc = 0.
is_final_inv-bas_val = is_konv-kwert.
ENDIF.
CLEAR is_konv.
READ TABLE it_konv INTO is_konv WITH KEY knumv = is_vbrk-knumv
kposn = is_vbrp-posnr
kschl = 'JIVP'
BINARY SEARCH.
IF sy-subrc = 0.
is_final_inv-tax_typ = 'VAT'.
ENDIF.
CLEAR is_konv.
READ TABLE it_konv INTO is_konv WITH KEY knumv = is_vbrk-knumv
kposn = is_vbrp-posnr
kschl = 'JIVC'
BINARY SEARCH.
IF sy-subrc = 0.
is_final_inv-tax_typ = 'CST'.
ENDIF.
CLEAR is_konv.
CLEAR is_konv.
ENDLOOP.
CLEAR is_konv.
CLEAR is_konv.
ENDLOOP.
CLEAR is_konv.
CLEAR is_konv.
ENDLOOP.
CLEAR is_konv.
READ TABLE it_konv INTO is_konv WITH KEY knumv = is_vbrk-knumv
kposn = is_vbrp-posnr
kschl = 'ZDEV'
BINARY SEARCH.
IF sy-subrc = 0.
is_final_inv-dev = ( is_konv-kbetr / 10 ).
is_final_inv-dev_amt = is_konv-kwert.
ENDIF.
ENDIF.
ENDIF.
is_final_inv-bas_val = is_final_inv-bas_val * ( -1 ).
is_final_inv-r_dis = is_final_inv-r_dis * ( -1 ).
is_final_inv-net_val = is_final_inv-net_val * ( -1 ).
is_final_inv-tax1 = is_final_inv-tax1 * ( -1 ).
is_final_inv-tax1_amt = is_final_inv-tax1_amt * ( -1 ).
is_final_inv-tax2 = is_final_inv-tax2 * ( -1 ).
is_final_inv-tax2_amt = is_final_inv-tax2_amt * ( -1 ).
is_final_inv-dev = is_final_inv-dev * ( -1 ).
is_final_inv-dev_amt = is_final_inv-dev_amt * ( -1 ).
is_final_inv-tax4 = is_final_inv-tax4 * ( -1 ).
is_final_inv-tax4_amt = is_final_inv-tax4_amt * ( -1 ).
is_final_inv-tot_tax = is_final_inv-tot_tax * ( -1 ).
is_final_inv-tot_amt = is_final_inv-tot_amt * ( -1 ).
is_final_inv-menge = is_final_inv-menge * ( -1 ).
ENDIF.
CLEAR is_final_inv.
ENDLOOP.
is_layout-zebra = c_x .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*Text elements
*----------------------------------------------------------
* 001 Enter valid supply plant
* 002 Enter valid Receiving plant
* 003 Enter valid division
* 004 No data found
* 010 Sto No
* 011 EBELN
* 012 Source Plant
* 013 WERKS
* 014 Source Name
* 015 NAME_SRP
* 016 Dest.Plant
* 017 WEMPF
* 018 Destination Name
* 019 NAME_DSP
* 020 Delivery No
* 021 VBELN
* 022 Shipment No
* 023 VBELV
* 024 Shipment Dt
* 025 ERDAT
* 026 Service Agent Name
* 027 NAME_VND
* 028 Division
* 029 SPART
* 030 Material
* 031 MATNR
* 032 Material Description
* 033 ARKTX
* 034 Category
* 035 PRCTR
* 036 Quantity
* 037 MENGE
* 038 Truck No
* 039 SIGNI
* 040 Way Bill No
* 041 TEXT3
* 042 LR No
* 043 TEXT1
* 044 Delivery Challan Number
* 045 TEXT2
* 050 VGBEL
* 051 Ref.doc.
* 052 VGPOS
* 053 RefItm
* 054 VBELN
* 055 Delivery
* 056 LFART
* 057 DlvTy
* 058 ERDAT
* 059 Created on
* 060 WERKS
* 061 Plnt
* 062 KUNNR
* 063 Ship-to-party
* 064 ROUTE
* 065 Route
* 066 MATNR
* 067 Material
* 068 ARKTX
* 069 Material Description
* 070 PRCTR
* 071 Category
* 072 LGORT
* 073 SLoc
* 074 CHARG
* 075 Batch
* 076 MENGE
* 077 Delivery quantity
* 078 MEINS
* 079 SU
* 080 WADAT_IST
* 081 Ac.GI date
* 082 WERKS1
* 083 Plant
* 084 REGIO
* 085 Region
* 100 No data found for the given division
* 110 Selection screen
*Selection texts
*----------------------------------------------------------
* R_K2 K2
* R_K3 K1 & K3
* R_PRD Production Source Sales K1 K3
* R_PRD1 K1 K3 - Invoice Details
* S_DATE Date
* S_PLNT_D Receiving Plant
* S_PLNT_S Supplying Plant
* S_PRCTR Category
* S_SPART Division
*Messages
*----------------------------------------------------------
*
* Message class: YMFI
*000 & & & &
----------------------------------------------------------------------------------