Required Shade column
Hello Abap Gurus;
I have a report of invoice list.In this report i want shade column
of the SD document: Delivery: Item data in which the shade is displayed.I m attaching the code also.
*& Report ZRPT_SD_002
REPORT zrpt_sd_002 LINE-SIZE 70 NO STANDARD PAGE HEADING
MESSAGE-ID zcvs.
TABLES
TABLES : vbak , " Sales Document Header
vbap , " Sales Document Item
kna1 , " Customer Master
vbkd , " Business Data
t023t , " MAterial Group
ekkn ,
mara ,
lfa1,
t134t , " Material Type
t024d , " MAterial Controller
t188t , " Zone
tvkbt , " Sales OFfice Text
tvaut , " Order Reason
vbfa , " Order Status
vbep , " Schedule Line Data
mska , " Sales Order Stock
vbrp , " Billing Header
afko , " Production Order
vbrk , " Billing Header
konv , " Condition Type Table
likp , " Delivery Header
knb1 ,
bkpf ,
cabnt , vttp,vttk,
tvro,vbpa.
TYPE-POOLS
TYPE-POOLS : slis.
VARIABLE DECLARATION
DATA : maktx LIKE makt-maktx,
knttp LIKE ekpo-knttp,
city1 LIKE adrc-city1,
tknum LIKE vttk-tknum,
name1 LIKE lfa1-name1,
lzone LIKE kna1-lzone,
mtbez LIKE t134t-mtbez,
wgbez LIKE t023t-wgbez, " Material Group Text
bezei LIKE tvaut-bezei, " Order Reason Text
kvgr1 LIKE vbak-kvgr1, " Product Manager
vtext LIKE t188t-vtext, " Product Manager Text
vtext2 LIKE t188t-vtext, " Regional Mgnr Text
vtext3 LIKE t188t-vtext, " Key Account Group
vtext4 LIKE t188t-vtext, " Special Group
vtext5 LIKE t188t-vtext, " Executive
vbezei LIKE tvkbt-bezei, " Sales office
matkl LIKE mara-matkl, " Material Group
mtart LIKE mara-mtart, " Material Type
erdat LIKE vbak-erdat,
audat LIKE vbak-audat,
auart LIKE vbak-auart,
bstkd LIKE vbkd-bstkd,
prdha LIKE mara-prdha,
belnr LIKE bkpf-belnr,
text(30) TYPE c ,
v_tabix LIKE sy-tabix,
lifnr LIKE lfa1-lifnr,
tname LIKE lfa1-name1,
bstdk LIKE vbkd-bstdk,
ordat LIKE vbrk-erdat,
stext LIKE tspat-vtext,
ktext LIKE t151t-ktext,
v_brtxt LIKE t016t-brtxt,
v_month TYPE i,p_mon TYPE i,
v_mname(20),p_mname(20),
v_ptext LIKE t052u-text1.
DATA : cl_data LIKE clobjdat OCCURS 0 WITH HEADER LINE.
DATA : i_cl_data LIKE clobjdat OCCURS 0 WITH HEADER LINE.
DATA : dmbtr LIKE bseg-dmbtr,
gbsta LIKE vbup-gbsta,
mbdat LIKE vbep-mbdat,
kalab LIKE mska-kalab,
bonba LIKE vbrp-bonba,
gltrp LIKE afko-gltrp,
mblnr LIKE mseg-mblnr,
budat LIKE mkpf-budat,
prtext LIKE t179t-vtext,
signi LIKE vttk-signi, " Truck Number
landx LIKE t005t-landx.
DATA : BEGIN OF tline OCCURS 0 .
INCLUDE STRUCTURE tline .
DATA : END OF tline .
DATA : soh LIKE rstxt-tdname ,
destcty(30).
DATA : klmeng LIKE vbap-klmeng.
DATA : tabix LIKE sy-tabix.
DATA : cmgst LIKE vbuk-cmgst,
option(10) TYPE c .
DATA : BEGIN OF delivery_header.
INCLUDE STRUCTURE likp.
DATA : END OF delivery_header.
DATA : BEGIN OF shipment_header.
INCLUDE STRUCTURE vttk.
DATA : END OF shipment_header.
DATA : BEGIN OF ivbrk OCCURS 0.
INCLUDE STRUCTURE vbrk.
DATA : brsch LIKE kna1-brsch,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01.
DATA : END OF ivbrk.
DATA : v_regio LIKE kna1-regio,
v_brsch LIKE kna1-brsch,
v_ort01 LIKE kna1-ort01,
v_land1 LIKE kna1-land1.
New For Days Start
DATA: len TYPE i.
DATA : BEGIN OF head OCCURS 0,
field(5),
text(30),
END OF head.
DATA : p_ftext1(30),
p_ftext2(30),
p_ftext3(30),
p_ftext4(30),
p_ftext5(30),
p_ftext6(30).
New For Days End
DECLARATION FOR ALV
DATA: fieldtab TYPE slis_t_fieldcat_alv,
heading TYPE slis_t_listheader,
layout TYPE slis_layout_alv,
events TYPE slis_t_event,
repname LIKE sy-repid,
f2code LIKE sy-ucomm VALUE '&ETA',
g_save(1) TYPE c,
g_variant LIKE disvariant,
gx_variant LIKE disvariant,
g_exit(1) TYPE c.
DATA: keyinfo TYPE slis_keyinfo_alv.
CONSTANTS: formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
DATA: alv_print TYPE slis_print_alv.
DATA: alv_detail_func(30).
DATA: g_pos TYPE i.
DATA: tabname TYPE slis_tabname.
INTERNAL TABLES DECLARATION
DATA : BEGIN OF ivbeln OCCURS 1,
vbeln LIKE vbrk-vbeln, " Billing Document
posnr LIKE vbrp-posnr, " Billing Doc Item
fkart LIKE vbrk-fkart, " Billing Type
vbtyp LIKE vbrk-vbtyp, " SD Docnument Category
vbtyp_desc(35) , " Vbtyp description
vkgrp LIKE vbrp-vkgrp, " Sales Group
fkdat LIKE vbrk-fkdat, " Billing Date
matnr LIKE vbrp-matnr, " Material
arktx LIKE vbrp-arktx, " Material Desc
kunnr LIKE vbrk-kunag, " Customer Code
name1 LIKE kna1-name1, " Customer Name
ort01 LIKE kna1-ort01, " Customer City
fkimg LIKE vbrp-fkimg, " Billed Qty
werks LIKE vbrp-werks, " Plant
pl_land1 LIKE t001w-land1, " Plant Country
pl_regio LIKE t001w-regio, " Plant Region Code
regio_tx LIKE t005u-bezei, " Plant Region Name
netwr LIKE vbrp-netwr, " Net Price
vkorg LIKE vbrk-vkorg, " Sales Organisation
vtext LIKE tvkot-vtext, " Sales Org.Text
vtweg LIKE vbrk-vtweg, " Distribution Channel
vttxt LIKE tvtwt-vtext, " Dist.Channel Text
vkbur LIKE vbrp-vkbur, " Sales Office
vbezei LIKE tvkbt-bezei, " Sales Office Text
spart LIKE vbrp-spart, " Division
stext LIKE tspat-vtext, " Sales Division Text
kvgr1 LIKE vbrp-kvgr1, " District
vtext1 LIKE tvv1t-bezei, " District Name
kvgr2 LIKE vbrp-kvgr2, " Taluka
vtext2 LIKE t188t-vtext, " Taluka Name
kvgr3 LIKE vbrp-kvgr3, " Village
vtext3 LIKE t188t-vtext, " Village Name
kvgr4 LIKE vbrp-kvgr4, " Special Group
vtext4 LIKE t188t-vtext, " Special Group
kvgr5 LIKE vbrp-kvgr5, " Executive
vtext5 LIKE t188t-vtext, " Executive Text
ZZLZONE LIKE VBAP-ZZLZONE , " Transport.Zone(Sold To Party)
lztxt LIKE tzont-vtext, " Trans.Zone Desc(Sold To Party)
waerk LIKE vbap-waerk, " Document Currency
inco1 LIKE vbkd-inco1, " Inco Terms1
inco2 LIKE vbkd-inco2, " Inco Terms2
bukrs LIKE vbrk-bukrs, " Company Code
lgort LIKE vbrp-lgort, " Storage Loc
vrkme LIKE vbrp-vrkme, " Sales Unit
aubel LIKE vbrp-aubel, " Sales Doc
aupos LIKE vbrp-aupos, " Sales Doc Item
audat LIKE vbak-audat, " Sales Order Date
klmeng LIKE vbap-klmeng, " Sales Qty
knumv LIKE konv-knumv, " Cond.Doc No
frate LIKE konv-kbetr, " Rate
fvalue LIKE konv-kwert, " Value
erate LIKE konv-kbetr, " Excise Rate
evalue LIKE konv-kwert, " Excise Value
kschl LIKE konv-kschl, " Condition Type
mtart LIKE mara-mtart, " Material TYpe
matkl LIKE mara-matkl, " Material Group
stceg LIKE vbrk-stceg, " VAT Reg.No
sfakn LIKE vbrk-sfakn, " Cancelled Bill Doc No
sfakn1 LIKE vbrk-sfakn, " Reversed Bill Doc No
rfbsk LIKE vbrk-rfbsk, " Accounting Transfer Status
fksto LIKE vbrk-fksto, " Bill Doc.Cancel Ind
fksto_tx(60), " Bill Doc.Cancel text
erdat LIKE vbrk-erdat, " Creation Date
erzet LIKE vbrk-erzet, " Creattion Time
regio LIKE kna1-regio, " Region
pstyv LIKE vbrp-pstyv, " Sales Doc Item Cat.
vgbel LIKE vbak-vgbel, " Ref.Doc No
vgpos LIKE vbap-vgpos, " Ref.Doc.Item.No
cmgst LIKE vbuk-cmgst, " Credit Status
zterm LIKE vbrk-zterm, " Pay Term
auart LIKE vbak-auart, " Sales Order Type
bstkd LIKE vbkd-bstkd, " Cust.PO No
bstdk LIKE vbkd-bstdk, " Cust.PO Date
mwsbp LIKE vbrp-mwsbp, " Tax Amount
belnr LIKE bkpf-belnr, " Acc.Doc No
kzwi1 LIKE vbrp-kzwi1 , " Base Price
kzwi2 LIKE vbrp-kzwi2 , "
kzwi3 LIKE vbrp-kzwi3 , " Discounts
kzwi4 LIKE vbrp-kzwi4, " Packing and forwarding
kzwi5 LIKE vbrp-kzwi5 , " Excise
kzwi6 LIKE vbrp-kzwi6 , " LST/ CST
mtbez LIKE t134t-mtbez, " Material Type Text
wgbez LIKE t023t-wgbez, " Material Group Text
land1 LIKE vbrk-land1, " Country
landx(20), " Country Text
abrvw LIKE tvlvt-abrvw, " Usage Ind.
reasn LIKE tvlvt-bezei, " Desc
prdha LIKE mara-prdha, " Prod Hir.
edg(2),
char1 LIKE ausp-atwrt , " Characteristic
char2 LIKE ausp-atwrt , " Characteristic
char3 LIKE ausp-atwrt , " Characteristic
char4 LIKE ausp-atwrt , " Characteristic
char5 LIKE ausp-atwrt , " Characteristic
char6 LIKE ausp-atwrt , " Characteristic
char7 LIKE ausp-atwrt , " Characteristic
char8 LIKE ausp-atwrt , " Characteristic
char9 LIKE ausp-atwrt , " Characteristic
char10 LIKE ausp-atwrt , " Characteristic
char11 LIKE ausp-atwrt , " Characteristic
char12 LIKE ausp-atwrt , " Characteristic
char13 LIKE ausp-atwrt , " Characteristic
char14 LIKE ausp-atwrt , " Characteristic
char15 LIKE ausp-atwrt , " Characteristic
char16 LIKE ausp-atwrt , " Characteristic
lifnr LIKE lfa1-lifnr, " Vendor
tname LIKE lfa1-name1, " Vendor Name
ordat LIKE vbrk-fkdat, " order Date
charg LIKE vbrp-charg, " Batch
kdgrp_auft LIKE vbrp-kdgrp_auft, " Customer Sales Group
ktext LIKE t151t-ktext, " Customer Sales Group Text
signi LIKE vttk-signi, " License No
route LIKE likp-route, " Route
routid LIKE tvro-routid, " Route ID
rt_bezei LIKE tvrot-bezei, " Route Desc
vstel LIKE likp-vstel, " Shipping Point
sp_vtext LIKE tvstt-vtext, " Ship Point Desc
distz LIKE v_tvro_com-distz, " Distance
brsch LIKE kna1-brsch, " Industry Key
brtxt LIKE t016t-brtxt, " Industry Name
mname LIKE kna1-name1, " Name
exnum LIKE j_1iexchdr-exnum, " Ex.Number
exdat LIKE j_1iexchdr-exdat, " Ex.Date
exbed LIKE j_1iexcdtl-exbed, " Ex.BED Amt
ecs LIKE j_1iexcdtl-ecs, " Ex.ECESS Amt
expind LIKE j_1iexchdr-expind, " Export Ind.
expind_desc LIKE dd07t-ddtext, " Export Ind.Desc
exgrp LIKE j_1iexchdr-exgrp, " Exc.Group
srgrp LIKE j_1iexchdr-srgrp, " Series Group
sanum LIKE vbap-vbeln, " Sales Order No
sapos LIKE vbap-posnr, " SO Item No
tknum LIKE vttk-tknum, " Shipment No
exti1 LIKE vttk-exti1, " Vehicle Number
exti2 LIKE vttk-exti2, " Driver Name
tr_count TYPE i, " Truck Count
vsart LIKE vttk-vsart, " Shipment Type
st_bezei LIKE t173t-bezei, " Shipment Type Desc
zb00 LIKE konv-kbetr, " Basic Rate
xcpdk LIKE vbpa-xcpdk, " One Time Account
adrnr LIKE vbpa-adrnr, " Address Number
shpcd LIKE kna1-kunnr, " Ship to Party
shpnm LIKE kna1-name1, " Ship to Party Name
sh_regio LIKE kna1-regio, " Region(SH)
sh_land1 LIKE kna1-land1, " Country
SH_LZONE LIKE VBAP-ZZLZONE , " Transport.Zone(Ship To Party)
sh_lztxt LIKE tzont-vtext, " Trans.Zone Desc(Ship To Party)
mblnr LIKE mseg-mblnr, " Material Doc No
budat LIKE mkpf-budat, " Doc Date
konda LIKE vbrk-konda, " Sales Zone
ptext LIKE t188t-vtext, " Text
zrbat LIKE konv-kwert, " Rebate Amount
serdt LIKE vbak-erdat, " S.A Create Date
groes LIKE mara-groes, " Size/Dimensions
dtext(20), "
prodt(20), "
mtext(20), "
prdqy LIKE vbrp-fkimg, "
aufnr LIKE afko-aufnr, " Order No
city1 LIKE adrc-city1, " City
packno(3), " Pack No
inv_rate LIKE konv-kbetr, " Inv Rate
inv_amt LIKE konv-kwert, " Inv Amount
frt_rate LIKE konv-kbetr, " Frt Rate
frt_amt LIKE konv-kwert, " Frt Amount
td_fkimg LIKE vbrp-fkimg, " Trade Inv.Qty
nt_fkimg LIKE vbrp-fkimg, " Non-Trade Inv.Qty
st_fkimg LIKE vbrp-fkimg, " Stk.Trsf.Inv.Qty
tot_fkimg LIKE vbrp-fkimg, " Total
or_dl_vbeln LIKE lips-vbeln, " Original Delivery
or_dl_posnr LIKE lips-posnr, " Original Del.Item
or_in_vbeln LIKE vbrp-vbeln, " Original Invoice
or_in_fkdat LIKE vbrk-fkdat, " Original Inv.Date
or_in_posnr LIKE vbrp-posnr, " Original Inv.Item
or_in_knumv LIKE vbrk-knumv, " Original Inv.Cond.No
or_in_frt_amt LIKE konv-kwert, " Original Frt Amount
or_in_fkimg LIKE vbrp-fkimg, " Original Qty
diff_date TYPE p, " Date Differance
pfield1 LIKE vbrp-fkimg, " Day 1
pfield2 LIKE vbrp-fkimg, " Day 2
pfield3 LIKE vbrp-fkimg, " Day 3
pfield4 LIKE vbrp-fkimg, " Day 4
pfield5 LIKE vbrp-fkimg, " Day 5
pfield6 LIKE vbrp-fkimg, " Above Days
pfield7 LIKE vbrp-fkimg, " TOTAL DAYS
bolnr LIKE likp-bolnr, " LR/DC No
INCLUDE STRUCTURE ZSD_MATGROUPS. " Inc.For Mat.Groups
chaname TYPE lfa1-name1,
lcnum TYPE vbkd-lcnum,
tdline TYPE tline-tdline,
docno type j_1iexchdr-docno.
DATA: END OF ivbeln.
DATA : BEGIN OF i_mat_tab OCCURS 0,
dtext LIKE ivbeln-dtext,
prodt(20),
mtext(20),
name1 LIKE ivbeln-name1,
kunnr LIKE ivbeln-kunnr,
fkimg LIKE ivbeln-fkimg,
END OF i_mat_tab.
DATA : BEGIN OF it_vbtyp OCCURS 0.
INCLUDE STRUCTURE dd07v.
DATA : END OF it_vbtyp.
DATA : BEGIN OF i_mseg OCCURS 0.
INCLUDE STRUCTURE mseg.
DATA : END OF i_mseg.
DATA : BEGIN OF i_mseg_coll OCCURS 0,
matnr LIKE mseg-matnr,
charg LIKE mseg-charg,
menge LIKE mseg-menge,
aufnr LIKE mseg-aufnr,
werks LIKE mseg-werks,
END OF i_mseg_coll.
*-- For Sales Plan Details
DATA : exnum LIKE j_1iexchdr-exnum,
exdat LIKE j_1iexchdr-exdat,
exbed LIKE j_1iexchdr-exbed,
expind LIKE j_1iexchdr-expind,
exgrp LIKE j_1iexchdr-exgrp,
srgrp LIKE j_1iexchdr-srgrp,
shpcd LIKE kna1-kunnr,
shpnm LIKE kna1-name1,
shreg LIKE kna1-regio,
shlnd LIKE kna1-land1,
xcpdk LIKE vbpa-xcpdk,
adrnr LIKE vbpa-adrnr,
sanum LIKE vbap-vbeln,
serdt LIKE vbak-erdat,
ptext LIKE t188t-vtext,
sapos LIKE vbap-posnr.
DATA : BEGIN OF iitem OCCURS 1,
kunnr LIKE ivbeln-kunnr,
name1 LIKE ivbeln-name1,
vkbur LIKE ivbeln-vkbur,
vbezei LIKE ivbeln-vbezei,
dtext LIKE tvtwt-vtext,
matnr LIKE ivbeln-matnr,
arktx LIKE ivbeln-arktx,
VTWEG LIKE ZCVI_VBRKVBRP-VTWEG,
land1 LIKE kna1-land1,
landx LIKE t005t-landx,
END OF iitem.
DATA : BEGIN OF t_konv OCCURS 0,
knumv LIKE konv-knumv,
kposn LIKE konv-kposn,
krech LIKE konv-krech,
kwert LIKE konv-kwert,
kbetr LIKE konv-kbetr,
kawrt LIKE konv-kawrt,
kschl LIKE konv-kschl,
END OF t_konv.
DATA : kunnr LIKE kna1-name1,
pdate LIKE sy-datum,
frate LIKE konv-kbetr,
erate LIKE konv-kbetr,
evalue LIKE konv-kwert,
fvalue LIKE konv-kwert,
zwels LIKE knb1-zwels.
*DATA : BEGIN OF ISDCHAR OCCURS 0 .
INCLUDE STRUCTURE ZCTA_SDCHAR .
*DATA END OF ISDCHAR .
DATA : BEGIN OF it_char OCCURS 0.
DATA : tabix(2) TYPE c,
atbez(30),
descrp(30) TYPE c.
INCLUDE STRUCTURE vbmuez.
DATA : END OF it_char.
DATA : ichar LIKE sel_char OCCURS 0 WITH HEADER LINE.
DATA : reasn LIKE tvlvt-bezei.
FIELD-SYMBOLS *
FIELD-SYMBOLS : <table> TYPE table ,
<struc> ,
<field> ,
<component> .
Data Declaration for Dynamic Assignment *
DATA : alv_fieldcat TYPE slis_t_fieldcat_alv,
lt_alv_cat TYPE TABLE OF lvc_s_fcat,
it_fieldcat LIKE LINE OF lt_alv_cat.
DATA : i_table TYPE REF TO data,
i_structure TYPE REF TO data.
DATA : new_tabix LIKE sy-tabix.
DATA : v_ebeln LIKE ekkn-ebeln ,
v_ebelp LIKE ekkn-ebelp ,
groes LIKE mara-groes.
DATA : t_char LIKE sel_char OCCURS 0 WITH HEADER LINE.
Macro Definition for assigning and unassigning component
Assign a field to a component and component to a structure
DEFINE assign_component.
assign &1 to <component>.
assign component <component> of structure <struc> to <field>.
END-OF-DEFINITION.
Unassign a Component.
DEFINE unassign_field.
if &1 is assigned.
unassign &1.
endif.
END-OF-DEFINITION.
SELECTION - SCREEN
*For ALV Variant
SELECTION-SCREEN BEGIN OF BLOCK d WITH FRAME TITLE text-s01.
PARAMETERS: p_vari LIKE disvariant-variant. " ALV Variant
SELECTION-SCREEN END OF BLOCK d.
For Basic Data
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-s02.
SELECT-OPTIONS: s_kunnr FOR vbrk-kunrg MATCHCODE OBJECT debi,
s_vbeln FOR vbrk-vbeln MATCHCODE OBJECT vmva,
s_fkdat FOR vbrk-fkdat OBLIGATORY,
s_matnr FOR vbrp-matnr MATCHCODE OBJECT mat1,
s_fkart FOR vbrk-fkart ,
s_pstyv FOR vbap-pstyv,
s_spart FOR vbrk-spart.
SELECTION-SCREEN END OF BLOCK a.
For Organisational Data
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-s03.
SELECT-OPTIONS: s_vkorg FOR vbrk-vkorg,
s_vtweg FOR vbrk-vtweg,
s_bukrs FOR vbrk-bukrs,
s_vkbur FOR vbrp-vkbur,
s_regio FOR kna1-regio,
s_werks FOR vbrp-werks,
s_brsch FOR kna1-brsch. " Industry Key
SELECTION-SCREEN END OF BLOCK b.
NEW ADDED BY AJAY 22-06-2006
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-d01.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-d02.
SELECTION-SCREEN POSITION 32.
PARAMETERS : p_field1(3) TYPE n DEFAULT '001',
p_field2(3) TYPE n DEFAULT '005',
p_field3(3) TYPE n DEFAULT '007',
p_field4(3) TYPE n DEFAULT '009',
p_field5(3) TYPE n DEFAULT '015'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK c.
NEW ADDED END BY AJAY 22-06-2006
INITIALIZATION
INITIALIZATION.
repname = sy-repid.
PERFORM build_eventtab USING events[].
PERFORM build_layout .
PERFORM initialize_variant.
AT SELECTION-SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
AT SELECTION-SCREEN.
PERFORM pai_of_selection_screen.
PERFORM check_input.
START OF SELECTION
START-OF-SELECTION.
PERFORM build_comment USING heading[].
PERFORM get_day_label.
PERFORM get_data.
PERFORM segregate_dist_chann_qty.
PERFORM initialise_fieldtab.
PERFORM attach_char_to_fieldcat.
PERFORM get_transporter_data.
PERFORM get_sd_matgroups.
PERFORM get_plant_from_po.
PERFORM get_excise_details.
PERFORM display_data.
END OF SELECTION
END-OF-SELECTION.
FORMS
*& Form get_data
*& Extracts data as per the users selection criteria.
FORM get_data.
DATA domname LIKE dd07v-domname.
DATA it_vrpma LIKE vrpma OCCURS 0 WITH HEADER LINE.
In case Doc No is specified in Selection use VBRK
Else use VRPMA(Material wise Billing Doc)
IF NOT s_vbeln IS INITIAL.
SELECT * FROM vbrk CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE ivbrk
WHERE mandt EQ sy-mandt
AND vbeln IN s_vbeln
AND fkart IN s_fkart
AND fkdat IN s_fkdat
AND kunag IN s_kunnr
AND vkorg IN s_vkorg
AND vtweg IN s_vtweg
AND bukrs IN s_bukrs
AND rfbsk NE 'E'
AND sfakn EQ space
AND fksto EQ space.
ELSE.
SELECT * FROM vrpma CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE it_vrpma
WHERE mandt EQ sy-mandt
AND matnr IN s_matnr
AND vkorg IN s_vkorg
AND fkdat IN s_fkdat
AND vtweg IN s_vtweg
AND fkart IN s_fkart
AND kunag IN s_kunnr
AND fkart NE 'ZCMR'
AND vbeln IN s_vbeln.
CHECK NOT it_vrpma[] IS INITIAL.
SORT it_vrpma BY vbeln.
SELECT * FROM vbrk INTO CORRESPONDING FIELDS OF TABLE ivbrk
FOR ALL ENTRIES IN it_vrpma
WHERE vbeln = it_vrpma-vbeln
AND rfbsk NE 'E'
AND sfakn EQ space
AND fksto EQ space.
ENDIF.
domname = 'VBTYP'.
Get the List of all Document Types
PERFORM get_domtext TABLES it_vbtyp USING domname.
IF NOT ivbrk[] IS INITIAL.
SORT ivbrk BY kunag.
LOOP AT ivbrk.
v_tabix = sy-tabix.
Get the Region,Industry Key, Name for Sold To Party
ON CHANGE OF ivbrk-kunag.
CLEAR : v_regio,v_brsch,name1,v_ort01,v_land1.
SELECT SINGLE regio brsch name1 ort01 land1 FROM kna1
CLIENT SPECIFIED
INTO (v_regio,v_brsch,
name1,v_ort01,v_land1 )
WHERE mandt = sy-mandt
AND kunnr = ivbrk-kunag.
ENDON.
Check for Region,Industry Key as per the Parameter
IF NOT s_regio[] IS INITIAL.
IF NOT v_regio IN s_regio.
DELETE ivbrk INDEX v_tabix.
CONTINUE.
ENDIF.
ENDIF.
IF NOT s_brsch[] IS INITIAL.
IF NOT v_brsch IN s_brsch.
DELETE ivbrk INDEX v_tabix.
CONTINUE.
ENDIF.
ENDIF.
ivbrk-regio = v_regio.
ivbrk-brsch = v_brsch.
ivbrk-name1 = name1.
ivbrk-ort01 = v_ort01.
ivbrk-land1 = v_land1.
ivbrk-netwr = 0.
MODIFY ivbrk TRANSPORTING regio brsch
name1 netwr ort01 land1.
CLEAR ivbrk.
ENDLOOP.
Get the Invoice Details from VBRP Table
IF NOT ivbrk[] IS INITIAL.
SELECT * FROM vbrp CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE ivbeln
FOR ALL ENTRIES IN ivbrk
WHERE mandt = sy-mandt
AND vbeln = ivbrk-vbeln
AND fkimg NE 0
AND matnr IN s_matnr
AND pstyv IN s_pstyv
AND spart IN s_spart
AND werks IN s_werks
AND vkbur IN s_vkbur.
ENDIF.
ENDIF.
IF NOT ivbeln[] IS INITIAL.
LOOP AT ivbeln.
READ TABLE ivbrk WITH KEY vbeln = ivbeln-vbeln.
IF sy-subrc EQ 0.
IF ivbrk-netwr IS INITIAL.
ivbrk-netwr = ivbeln-netwr.
ENDIF.
MOVE-CORRESPONDING ivbrk TO ivbeln.
CLEAR it_vbtyp.
READ TABLE it_vbtyp WITH KEY domvalue_l = ivbrk-vbtyp.
ivbeln-vbtyp_desc = it_vbtyp-ddtext.
MOVE ivbrk-kunag TO ivbeln-kunnr.
MODIFY ivbeln .
CLEAR ivbeln.
ENDIF.
ENDLOOP.
SORT ivbeln BY vbeln posnr.
DELETE ADJACENT DUPLICATES FROM ivbeln COMPARING ALL FIELDS.
CLEAR ivbeln.
Get the Material Type, Group and Production Hiearchy
LOOP AT ivbeln.
ON CHANGE OF ivbeln-matnr.
CLEAR : mtart,matkl,prdha.
SELECT SINGLE mtart matkl prdha FROM mara CLIENT SPECIFIED
INTO (mtart,matkl,prdha)
WHERE mandt EQ sy-mandt
AND matnr EQ ivbeln-matnr.
ENDON.
ivbeln-mtart = mtart.
ivbeln-matkl = matkl.
ivbeln-prdha = prdha.
MODIFY ivbeln TRANSPORTING mtart matkl prdha.
CLEAR ivbeln.
ENDLOOP.
LOOP AT ivbeln.
Retrieving Sales Order Date ,Customer PO No,Customer PO Date
ON CHANGE OF ivbeln-aubel.
CLEAR : bstkd,bstdk,ordat,audat.
SELECT SINGLE bstkd bstdk FROM vbkd
CLIENT SPECIFIED
INTO (bstkd,bstdk)
WHERE mandt EQ sy-mandt
AND vbeln EQ ivbeln-aubel.
SELECT SINGLE erdat audat FROM vbak CLIENT SPECIFIED
INTO (ordat,audat)
WHERE mandt = sy-mandt
AND vbeln = ivbeln-aubel.
In case of Stock Transfer, Or Export Excise GP
SO is really a PO Hence Date is tajken from EKKO
IF ivbeln-fkart EQ 'ZSTF' OR ivbeln-fkart EQ 'ZSTE'.
SELECT SINGLE bedat FROM ekko CLIENT SPECIFIED
INTO (audat)
WHERE mandt = sy-mandt
AND ebeln = ivbeln-aubel.
ENDIF.
ENDON.
IF ivbeln-erzet GE '000000' AND ivbeln-erzet LE '070000'.
ivbeln-erdat = ivbeln-erdat - 1.
ENDIF.
Get the Counry Descripion
ON CHANGE OF ivbeln-land1.
CLEAR : landx.
SELECT SINGLE landx INTO landx FROM t005t
WHERE land1 EQ ivbeln-land1
AND spras EQ sy-langu.
ENDON.
For retrieving text for Customer Group
ON CHANGE OF ivbeln-kdgrp_auft.
CLEAR : ktext.
SELECT SINGLE ktext FROM t151t
INTO ktext
WHERE spras EQ sy-langu
AND kdgrp EQ ivbeln-kdgrp_auft.
ENDON.
For Retrieving texts for KVGR1 KVGR2 KVGR3 KVGR4 KVGR5
ON CHANGE OF ivbeln-kvgr1.
CLEAR : vtext.
SELECT SINGLE bezei INTO vtext FROM tvv1t
WHERE kvgr1 EQ ivbeln-kvgr1
AND spras EQ sy-langu.
ENDON.
ON CHANGE OF ivbeln-kvgr2.
CLEAR :vtext2.
SELECT SINGLE bezei INTO vtext2 FROM tvv2t
WHERE kvgr2 EQ ivbeln-kvgr2
AND spras EQ sy-langu.
ENDON.
ON CHANGE OF ivbeln-kvgr3.
CLEAR :vtext3.
SELECT SINGLE bezei INTO vtext3 FROM tvv3t
WHERE kvgr3 EQ ivbeln-kvgr3
AND spras EQ sy-langu.
ENDON.
ON CHANGE OF ivbeln-kvgr4.
CLEAR :vtext4.
SELECT SINGLE bezei INTO vtext4 FROM tvv4t
WHERE kvgr4 EQ ivbeln-kvgr4
AND spras EQ sy-langu.
ENDON.
ON CHANGE OF ivbeln-kvgr5.
CLEAR : vtext5.
SELECT SINGLE bezei INTO vtext5 FROM tvv5t
WHERE kvgr5 EQ ivbeln-kvgr5
AND spras EQ sy-langu.
ENDON.
Get the Description for Usage Indicator
ON CHANGE OF ivbeln-abrvw.
CLEAR : reasn.
SELECT SINGLE bezei INTO reasn FROM tvlvt CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND abrvw EQ ivbeln-abrvw
AND spras EQ sy-langu.
ENDON.
Get Account Document
ON CHANGE OF ivbeln-vbeln.
CLEAR : belnr.
SELECT SINGLE belnr INTO belnr FROM bkpf
CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND awtyp EQ 'VBRK'
AND awkey EQ ivbeln-vbeln.
ENDON.
Get Division Text
ON CHANGE OF ivbeln-spart.
CLEAR : stext.
SELECT SINGLE vtext INTO stext FROM tspat
WHERE spart EQ ivbeln-spart
AND spras EQ sy-langu.
ENDON.
Get Price group Text
ON CHANGE OF ivbeln-konda.
CLEAR : ptext.
SELECT SINGLE vtext INTO ptext FROM t188t
WHERE konda EQ ivbeln-konda
AND spras EQ sy-langu.
ENDON.
Get Transporter Code ,Name
ON CHANGE OF ivbeln-vbeln.
CLEAR : lifnr,name1.
SELECT SINGLE lifnr INTO lifnr FROM vbpa
WHERE vbeln EQ ivbeln-vbeln
AND parvw EQ 'V1'.
IF NOT lifnr IS INITIAL.
SELECT SINGLE name1 FROM lfa1 INTO name1
WHERE lifnr EQ lifnr.
ENDIF.
*Ship To party Details
CLEAR: shpcd,shpnm,city1,kna1,xcpdk,adrnr.
SELECT SINGLE kunnr xcpdk adrnr
INTO (shpcd,xcpdk,adrnr)
FROM vbpa
WHERE vbeln EQ ivbeln-vbeln
AND parvw EQ 'WE'.
IF NOT shpcd IS INITIAL.
IF xcpdk EQ 'X'.
SELECT SINGLE name1 city1 transpzone region country
FROM adrc
INTO (shpnm,city1,lzone,shreg,shlnd)
WHERE addrnumber EQ adrnr.
ELSE.
SELECT SINGLE name1 ort01 lzone regio land1
FROM kna1
CLIENT SPECIFIED
INTO (shpnm,city1,lzone,shreg,shlnd)
WHERE mandt = sy-mandt
AND kunnr EQ shpcd.
ENDIF.
ENDIF.
ENDON.
Retrieve Text for Sales Office
ON CHANGE OF ivbeln-vkbur.
CLEAR : vbezei.
SELECT SINGLE bezei FROM tvkbt
INTO vbezei
WHERE spras EQ sy-langu
AND vkbur EQ ivbeln-vkbur.
ENDON.
Retrieve Text for Industry Key
ON CHANGE OF ivbeln-brsch.
CLEAR : v_brtxt.
SELECT SINGLE brtxt FROM t016t
INTO v_brtxt
WHERE spras EQ sy-langu
AND brsch EQ ivbeln-brsch.
ENDON.
Retrieve Text for Payment Terms
ON CHANGE OF ivbeln-zterm.
CLEAR : v_ptext.
SELECT SINGLE text1 FROM t052u
INTO v_ptext
WHERE spras EQ sy-langu
AND zterm EQ ivbeln-zterm.
ENDON.
Get Material Type Description,Material Group Desc
ON CHANGE OF ivbeln-mtart OR ivbeln-matkl.
CLEAR : wgbez,mtbez.
SELECT SINGLE wgbez FROM t023t
INTO wgbez
WHERE spras EQ sy-langu
AND matkl EQ ivbeln-matkl.
SELECT SINGLE mtbez FROM t134t
INTO mtbez
WHERE spras EQ sy-langu
AND mtart EQ ivbeln-mtart.
ENDON.
Get Delivery doc Number.
SELECT SINGLE vbeln erdat FROM vbfa INTO
(mblnr,budat)
WHERE vbelv = ivbeln-vgbel
AND posnv = ivbeln-vgpos
AND vbtyp_n = 'R'.
CLEAR : exnum,exdat.
Get the Excise Related Data
SELECT SINGLE exnum exdat FROM j_1iexchdr CLIENT SPECIFIED
INTO (exnum,exdat)
WHERE mandt = sy-mandt
AND trntyp = 'DLFC'
AND rdoc = ivbeln-vbeln
AND rind = 'N'
AND status = 'C'.
IF sy-subrc = 0.
SELECT SINGLE exbed ecs INTO (ivbeln-exbed,ivbeln-ecs)
FROM j_1iexcdtl
CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND rdoc2 = ivbeln-vbeln
AND ritem2 = ivbeln-posnr.
IF sy-subrc NE 0.
ivbeln-exbed = 0.
CLEAR ivbeln-exnum.
ENDIF.
ENDIF.
Read Characteristics
IF NOT ichar[] IS INITIAL.
PERFORM read_characteristics TABLES ichar
USING ivbeln-we
I have solved my query....
Similar Messages
-
Content types, Required site columns, How are they supposed to work?
Hi,
I have 2 issues:
I created a Folder level content type with many Required site columns. I was hoping that when I create a new folder the new content type screen will pop up and I must enter all the required properties (metadata) for this new folder.
Issue 1) But it didn't work that way. It just required me to enter the name of the folder and the folder was created.
Issue 2) I then went to Edit Properties to enter enter all the required metadata. I would like to have my newly created content type to be the default. So that when I open up the Edit Properties the popup screen would defalt to my new
content type. But it defaults to "Folder" Content type. even though in liberary setting, My new content type was the only one check "visible" and set as default.
Can someone please help? Am I missing something?
Thanks!I don't think you can do what you want to do using only out of the box features. A few notes:
Users will need to click the New Document dropdown in the ribbon to select your new folder content type. (I.e. Don't click New Folder)
The "default" option in the content type list is to pick the default content type to be selected when you click the New Document button. (I.e. it won't impact the New Folder ribbon button)
The ribbon button for New Folder is hard coded to use the built in folder feature.
You may want to look into the 2010 Document Set feature to create folders with metadata. It will do what your custom content type does and a lot more.
Possible solutions:
Create JavaScript hack that changes the New Folder link in the ribbon to go to the New Document link for your custom content type.
Create a Visual Studio Feature to hide the New Folder button and add a new New Folder button that points to the New Document link for your custom content type.
Leave the existing New Folder button there and create Feature to add a new custom button for your content type.
Mike Smith TechTrainingNotes.blogspot.com
my SP customization book -
Require that this column contains information is missing
I've got a Risks List on SharePoint 2007, as part of Project Server 2007 ,within which there is a column that I want to change its status to “required”. I went to Settings --> List Settings,
under Columns I clicked on the column name to edit. But under the Additional Column Settings, I don't see the option to "Require that this column contains information".
Why is this option missing?
In other environments we have, we were able to change the column designation with no problem and also in other lists in the same environment this
possibility appears.
RoygHi Royg--
1. go to “List settings” > Advanced Settings and check “yes” of “allow management of content types” then click “OK”
2. On list setting page, find the field in the “Columns” and check this field is used in which content type.
3. Click the content type name in which this field is used on list settings page.
4. Click the field name in “Columns” on this “List content type” page
5. Now you can change the column to be “Required” in “Column Settings” option.
Hope that helps.
If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82 -
Lead Columns in Report Painter
Hi All
Is it possible to have two lead columns in a report? My requirement is that i want to prepare a profit and loss account by using report painter. It should look like
Expense Amount Revenue Amount
Exp G/L A/c XXX Sale G/L A/c XXX (For Example)
Now i want to define Expense column as lead column and revenue column as a lead column
Kindly help me with issue
Regards
InvinHi Abhijit
Kindly elaborate it I am new to report painter i would like to tell you again what is my specific design requirement
LEAD Column Column 1 LEAD Column Column 2
Expense Amount Revenue Amount
(These four will be my columns under this following will be )
Salary Exp G/L 1000 Sale G/L A/c 2000 (For Example)
(This salary will be my heading and i will be typing in words and under this i will be assigning my salary Gl A/c same will be the case with Sale)
Now i want to define Expense column as lead column and revenue column as a lead column so that i can write Salary as heading and sales as heading just like traditional Profit and loss account what earlier we use to prepare by hand.
Kindly elaborate it how to do it
Regards
Invin
Edited by: sapcofi on Oct 6, 2009 1:37 PM -
Query Help - Add a column that doesn't exist in table
Hello,
i have an application that runs a query in code off of a main query, and that query in code requires a column that does not exist in the main query that I created. how do I go about adding a column to a query that does not actually exist in the table or database that I am querying?
For Example:
SELECT PROJ_ID, PROJECT_NAME
FROM PROJECT
I need a column called "DELETE_SESSION_ID" and this database/table does not contain that column anywhere. Is it best to create a view that creates the column somehow? I would prefer not having to create the column inside of the table. Any ideas are greatly appreciated.
Thanks,
Jeffuser10249614 wrote:
Hello,
i have an application that runs a query in code off of a main query, and that query in code requires a column that does not exist in the main query that I created. how do I go about adding a column to a query that does not actually exist in the table or database that I am querying?
For Example:
SELECT PROJ_ID, PROJECT_NAME
FROM PROJECT
I need a column called "DELETE_SESSION_ID" and this database/table does not contain that column anywhere. Is it best to create a view that creates the column somehow? I would prefer not having to create the column inside of the table. Any ideas are greatly appreciated.
Thanks,
JeffYou need a way to obtain the value you need - a function to generate it, perhaps. A view using such a function or aquiring the value by other means should work well.
Pipelined functions work well to generate values that aren't in the database at run time - if your version of Oracle supports them -
Converting Decimal to Interger value in a Column
Hi Folks,
We have a requirement with column name as Customers having two calculated column values with total and % of Customers in pivot table view.
Total Number of Customers % of Customers
Customers: 500.00 34.44
So my question is, how to remove decimal and impose integer value on Total Number of Customers at the same time retaining decimal for % of Customers.
Regards,
VjThe final result of our report is based on the union of two reports and the resultant report has a coulmn which two values one of total no. of cust and other a calculated column value with Cust %.
Total Number of Customers % of Customers
Customers: 500.00 34.44
So my question is, how to remove decimal and impose integer value on Total Number of Customers at the same time retaining decimal for % of Customers.
Regards,
Vj -
Additional Column in CJ20N at activity level
Hi Experts
The requirment is to add a new column for material price in the right hand side screen in CJ20N, when we select any activity in CJ20N and try to attach material component .
The new column (material price) should be next to the requirment quantity column, it will pick the price from material master and will display it.
This is a development thing ,but i want to know whether is it possible and what FM or user exit can be used.
Thanks
DHRUVHi DHRUV,
The table of CJ20N is not a ALV table, which allow you hide or dispay the selecte column.
So if you would like an additional one, you need enhance the codes. But actually the column price is avialble in tab ' purchase'.
The sequence of the column can be changed and save, to do it please use the icon 'configuration' at the right corner of the table.
Kind regards,
Zhenbo -
How to add a "custom" link to a report column
I have a "Tasks" report that is based on a view. the view is a union of 2 tables: "Project tasks" and "Non-project tasks", each one of them has its own form to enter the data.
I need to add a link from my report to to either form of the mentioned tables. So, if the task is project related, it should go to the "Projects Task" form, but if the task is no related to projects, the link should point to the second form.
How can I accomplish that in Apex 4.0 ?
ThanksThe view has a column for project name, if it was a non-project task, the column is defaulted to "Non-Project"Add another column to the report query (or to the view if it's a Wizard report), based on that column:
case project_name
when 'Non-Project' then '201' /* Page ID of non-project task form */
else '202' /* Page ID of project task form */
end form_page
...Then add a link to the required report column as described above by Alan, setting the target Page attribute to <tt>#FORM_PAGE#</tt>, the Name attribute of the task ID parameter to <tt>P#FORM_PAGE#_TASK_ID</tt> (the form pages will need to take task ID parameters following this naming convention), and the Value attribute to the task ID column from the view. -
Dynamic column name sql?
I need to do a select statement using dynamic column names. Can it be done WITHOUT building a string to execute the sql?
In other words, I want to use a variable name in the SELECT part of a statement.
ThanksProperly done, there shouldn't be a great difference in the performance of static and dynamic SQL. Of course, dynamic SQL is a whole lot more complicated to get right. It's also rather at odds with your requirement that column names get passed in dynamically-- if you don't know what columns you're going to select at compile time, you can't use static SQL.
That said, there are a handful of tricks around using Oracle's built-in XML processing functionality to simulate dynamic SQL. This is almost certainly less efficient than doing dynamic SQL in your case, and a whole lot more complicated, but it's technically not dynamic SQL.
The proper response, though, is almost certainly to either
1) figure out how to design the application so that column names need not be passed in at runtime or
2) use dynamic SQL.
If at all possible, option 1 is generally preferable. While there are situations where dynamic SQL is necessary, those tend to be rather rare.
Justin -
Hi,
In the application, we have used a table (of type 'Advanced Table') and under that I require a column to get hidden in the table. When i navigate to see the columns through "Personalize" link corresponding to the table, I came to know the column i require to hide is represented in the form of column group. And under that column group, it has a sub-category of may columns present under it.
Will it be ok if i hide only the required column under that column group by setting the rendered property to 'false' or do i have to hide the entire column group itself ?
Suggestions needed....
With Thanks,
ThiyagarajanThanks All for your valuable responses...
In the same table, i am doing some calculations in the 'processFormRequest' method when the 'submit' button is clicked and the table has nearly more than 25 rows and it is listed as 10 rows per page.
Once the page gets loaded after the 'submit' button gets clicked, the page displays the table's last 10 records and not from the first 10. Is there any function can be used to point the records in the table in the ascending order instead of descending ?
With Thanks,
Thiyagarajan -
Hi ,
I developing one ALV report , in that i required main column with some sub columns..
so how i develop this ?
e.g.
GIN
QTY
MVT
UMOhi look at this ...
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/subtotals%252bin%252bhirarchial%252breport
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/display%252bsimple%252bhirarchial%252blist%252bwith%252bclass%252b%252bcl_salv_hierseq_table
or else..
look at BCALV_TREE_SIMPLE_DEMO program -
Adding new columns & New dataware house Tables
Hello Gurus,
We are using OBIEE 7.9.6, with Oracle EBS OLTP. I would like to show a new colum in an existing dash board report that requires new column in datawarehouse table & staging table. I also have a requirement to add new custom datawarehouse table to create a new report. Does anyone know the step by step approach to do this with details such as BI tools that are required?
Any pointers on this is greatly appreciated!
Thanks,
ChandraPlease read this:
Oracle® Business Intelligence
Data Warehouse Administration Console User’s Guide
Version 10.1.3.4
E12652-01
Figure 8–1 Process Flow to Add New Object to Data Warehouse
Pg 59 -
Can you hide a column in a table within a Pages document?
Is it possible to have a table within a Pages document that allows you to hide columns..... I am trying to make a template for client quotations that requires a column containing discounts which needs to be hidden before I print. Haven't figured out how to make this happen.... can it be done?.... works in Numbers[as per XL] but not in Pages
many thanks
GaryOne of my biggest grievances with Forms Central is the lack of any kind of calculating (living in hope Adobe!)... you will have to do it in Excel.
-
Additional Columns in Appraisal Template
Hi,
I am currently creating a template similar to MBO in PHAP_CATALOG_PA.
Can i add additional columns in the template. Is there any configuration step to add additional column and give a column header name. For example: See Below, I require first column to be the list of objevtives, second column appraisee set his goals at the start of the year after having a mutual discussion with his manager. 3rd and 4th cloumns are for Mid year review one for self and other for manager. 5th and 6th columns are for the end of financial year to give the final scores.
Please note we are on ECC 6 with Latest support pack 61 (But not EHP4)
Objectives | Goal Setting by | Mid Year Review | Mid Year review | Final Review |Final Review
Self & Manager Self By Manager By Self By Manager
1. Primary Objectives
2. Department Objectives
3. Individual Objectives
4. Others.
Regards
Srinivasa NaiduHi,
Yes, you can create custom columns through transaction code OOHAP_BASIC.
Hope this helps.
Donnie -
How to Check Unique key for a Column in Many to Many relations ship
senario
Master Table
CODE DESC
ACT1 DESC1
ACT2 DESC2
ACT3 DESC3
Detail Table
CODE REFF_CODE DESC PRIORITY
SACT1 ACT1 SDESC1 1
SACT2 ACT1 SDESC2 2
SACT3 ACT1 SDESC3 3
SACT4 ACT1 SDESC4 4
SACT5 ACT1 SDESC5 5
SACT6 ACT2 SDESC6 1
SACT7 ACT2 SDESC7 2
SACT8 ACT2 SDESC8 3
SACT9 ACT2 SDESC9 4
SACT10 ACT3 SDESC10 1
SACT11 ACT3 SDESC11 2
SACT12 ACT3 SDESC12 3
OUTPUT REQUIRED
PRIORITY COLUMN MUST BE UNIQUE FOR EACH MASTER RECORD IN DETAIL TABLE...
PLS HELP ME IN THIS REGARDS,I am a little bit slow today ...
You want achieve this being updated in detail table ?
Detail Table
CODE REFF_CODE DESC PRIORITY
SACT1 ACT1 SDESC1 1
SACT2 ACT1 SDESC2 1
SACT3 ACT1 SDESC3 1
SACT4 ACT1 SDESC4 1
SACT5 ACT1 SDESC5 1
SACT6 ACT2 SDESC6 2
SACT7 ACT2 SDESC7 2
SACT8 ACT2 SDESC8 2
SACT9 ACT2 SDESC9 2
SACT10 ACT3 SDESC10 3
SACT11 ACT3 SDESC11 3
SACT12 ACT3 SDESC12 3
?
Maybe you are looking for
-
My MacBook won't connect to the Internet, but it's connected to my router. When I go to network preferences, it says that it has a self assigned ip address, and can't connect to the Internet. How can I fix this? Please help!
-
How to work with url in receiver mail adapter
hi, iam trying to implement simple file to mail scenario. I've got stuck with mail adapter configuration.The transport protocol iam using on receiver end is the SMTP protocol. i have mentioned the url as smtp://abc.xyz.com:25.Then iam getting an erro
-
How to create a bitmap from a FlashPro Shape?
CS Extension Builder n00b here. I am looking for a way to generate a bitmap from a FlashPro Shape object. The bitmap doesn't have to be a FlashPro Bitmap object... just an in-memory bitmap, or even a .png file on disc. Any ideas on how to accompl
-
How to search for annotated pages in pdf? E.g in textbook pdf
Would like to be able to track the annotated pages in my textbook pdf. Can that be done?
-
Unable to connect to db alogin of isqlplus in oracle 10g Release 10.2.0
To start the jazn shell I am using the following commant To start the JAZN shell, enter: $JAVA_HOME/bin/java -Djava.security.properties=$ORACLE_HOME/sqlplus/admin/iplus/provider -jar $ORACLE_HOME/oc4j/j2ee/home/jazn.jar -user "iSQL*Plus DBA/admin" -p