How to restrict repeated values
Hi,
Iam trying to get values from BSAK using logical database.
bsak-lifnr having having 10 records.
code
nodes: bsak,bseg.
get bsak.
write bsak-lifnr.
while iam outputting the data it is showing all the 10 records.But i want only one record.Could u pls tell me how to do that...
reward guaranteed.
Kaki
can u check this one
REPORT Z1F_RFKEPL00 no standard page heading
line-size 140
line-count 65
message-id Z1.
TABLES: LFA1,t005t,bsak,bseg,t001,skat.
data: begin of t_bsak occurs 0,
bukrs like bsak-bukrs, "company code
lifnr like bsak-lifnr, "Vendor acc number
augdt like bsak-augdt, "Clearing date
AUGBL like bsak-AUGBL, "Clearing Document
GJAHR like bsak-GJAHR, "year
belnr like bsak-belnr, "Document number
BUZEI like bsak-BUZEI, "Line Item
budat like bsak-budat, "Posting Date in the Document
bldat like bsak-bldat, "Document date in document
blart like bsak-blart, "Document type
BSCHL like bsak-BSCHL, "Posting key
WAERS like bsak-WAERS, "Currency key
CPUDT like bsak-cpudt, "Accounting Document Entry Date
SHKZG like bsak-shkzg, "Debit/Credit Indicator
DMBTR like bsak-dmbtr, "Amount in local currency
WRBTR like bsak-wrbtr, "Amount in document currency
SGTXT like bsak-sgtxt, "Item Text
SAKNR LIKE bsak-saknr, "G/L Account Number
hkont like bsak-hkont, "General Ledger Account
SKFBT LIKE BSAK-SKFBT, "Amount Eligible for Cash Discount
KOSTL LIKE BSEG-KOSTL, "Cost center
ktopl like t001-ktopl, "chart of accounts
txt20 like skat-txt20, "Short test for the GL acc
name1 like lfa1-name1,
land1 like lfa1-land1,
landx like t005t-landx,
end of t_bsak.
data: begin of t_header occurs 0,
bukrs like bsak-bukrs,
hkont like bsak-hkont,
lifnr like bsak-lifnr,
land1 like lfa1-land1,
name1 like lfa1-name1,
landx like t005t-landx,
end of t_header.
data: begin of t_lfa1 occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
land1 like lfa1-land1,
landx like t005t-landx,
end of t_lfa1.
data: t_bseg like t_bsak occurs 0 with header line.
data: t_data like t_bsak occurs 0 with header line.
selection-screen begin of block blk1 with frame title text-001.
select-options: s_lifnr for bsak-lifnr,
s_bukrs for bsak-bukrs.
selection-screen end of block blk1.
selection-screen begin of block blk2 with frame title text-002.
parameters s_budat like bsak-budat default sy-datum.
select-options: s_augdt for bsak-augdt.
selection-screen end of block blk2.
selection-screen begin of block blk3 with frame title text-003.
parameters: stand as checkbox default 'X',
park as checkbox.
selection-screen end of block blk3.
start-of-selection.
perform process_data.
top-of-page.
perform set_page_header.
*& Form process_data
text
form process_data.
data: line like t_bsak occurs 0 with header line.
data: l_wrbtr(10) type c.
data: l_debit type bsak-wrbtr,l_credit type bsak-wrbtr,
l_balance type bsak-wrbtr.
data:l_hkont(10) type n.
select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUZEI BUDAT BLDAT
CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT
from bsak
into corresponding fields of table t_bsak
where
lifnr in s_lifnr and
BUKRS in s_bukrs and
budat le s_budat and " Open items
augdt in s_augdt.
*DELETE t_bsak WHERE non-indexed field not in value list.
for parked items
if park = 'X'.
select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUZEI BUDAT BLDAT
CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT
from bsak
into corresponding fields of table t_bsak
where
lifnr in s_lifnr and
BUKRS in s_bukrs and
budat le s_budat and " Open items
augdt in s_augdt and
bstat = 'V'.
endif.
sort t_bsak by BUDAT.
CHECK NOT t_bsak[] IS INITIAL.
select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR
SHKZG DMBTR WRBTR SGTXT SKFBT KOSTL BSCHL hkont BUZEI
into corresponding fields of table t_bseg from bseg
FOR ALL ENTRIES IN t_bsak
where belnr = t_bsak-belnr and
gjahr = t_bsak-gjahr and
bukrs = t_bsak-bukrs.
to get vendor name
loop at t_bsak.
select single * from lfa1 where lifnr = t_bsak-lifnr.
move lfa1-lifnr to t_header-lifnr.
move lfa1-name1 to t_header-name1.
move lfa1-land1 to t_header-land1.
move t_bsak-bukrs to t_header-bukrs.
move t_bsak-hkont to t_header-hkont.
if sy-subrc = 0.
append t_header.
clear t_header.
endif.
endloop.
to get vendor country
loop at t_header.
select single * from t005t where land1 = t_header-land1 and
SPRAS = 'E'.
move t005t-landx to t_header-landx.
if sy-subrc = 0.
modify t_header.
clear t_header.
endif.
endloop.
sort t_header by bukrs.
delete adjacent duplicates from t_header.
loop at t_bsak.
loop at t_bseg where belnr = t_bsak-belnr.
l_hkont = t_bseg-hkont.
t_data-bukrs = t_bsak-bukrs.
t_data-lifnr = t_bsak-lifnr.
t_data-augdt = t_bseg-augdt.
t_data-AUGBL = t_bseg-AUGBL.
t_data-GJAHR = t_bseg-GJAHR.
t_data-belnr = t_bsak-belnr.
t_data-BUZEI = t_bseg-BUZEI.
t_data-budat = t_bsak-budat.
t_data-bldat = t_bsak-bldat.
t_data-blart = t_bsak-blart.
t_data-BSCHL = t_bseg-BSCHL.
t_data-WAERS = t_bseg-WAERS.
t_data-CPUDT = t_bsak-cpudt.
t_data-SHKZG = t_bseg-shkzg.
t_data-DMBTR = t_bseg-dmbtr.
t_data-WRBTR = t_bseg-wrbtr.
t_data-SGTXT = t_bsak-sgtxt.
t_data-SAKNR = t_bseg-saknr.
t_data-hkont = t_bseg-hkont.
t_data-SKFBT = t_bseg-SKFBT.
t_data-KOSTL = t_bseg-KOSTL.
t_data-ktopl = t_bseg-ktopl.
t_data-txt20 = skat-txt20.
append t_data.
clear t_data.
endloop.
endloop.
sort t_data by budat.
*To get Chart of accounts
loop at t_data.
select single * from t001 where bukrs = t_data-bukrs.
move t001-ktopl to t_data-ktopl.
if sy-subrc = 0.
modify t_data.
clear t_data.
endif.
endloop.
*To get short text for the chart of accounts
loop at t_data.
l_hkont = t_data-hkont.
select single * from skat where ktopl = t_data-ktopl and
saknr = l_hkont and
spras = 'E'.
t_data-txt20 = skat-txt20.
if sy-subrc = 0.
modify t_data.
clear t_data.
endif.
endloop.
*Display----
*to display header
data: l_buzei type bseg-buzei.
loop at t_header.
write:/1(6) t_header-bukrs color 2,
7(8) t_header-hkont color 2,
18(10) t_header-lifnr color 2.
write:/30(10) t_header-name1.
write:/30(10) t_header-landx.
uline.
loop at t_data where lifnr = t_header-lifnr.
l_wrbtr = t_data-wrbtr.
if t_data-wrbtr = t_data-skfbt.
concatenate l_wrbtr '-' into l_wrbtr.
endif.
write:/15(11) t_data-BUDAT no-zero color 7,
26(5) t_data-BLART color 7,
30(12) t_data-belnr color 7,
42(16) t_data-BLDAT color 7,
58(5) t_data-buzei color 7,
63(12) t_data-BSCHL color 7,
75(9) t_data-AUGDT color 7,
84(35) t_data-AUGBL color 7,
119(7) t_data-WAERS color 7,
126(12) l_wrbtr color 7.
write:/55 t_data-sgtxt.
write:/60(10) t_data-kostl,
70(10) t_data-hkont,
80(20) t_data-txt20.
clear l_wrbtr.
endloop.
uline.
write:/1(6) t_data-bukrs color 2,
7(8) t_data-hkont color 2,
18(10) t_data-lifnr color 2.
uline.
write:/1(6) t_data-bukrs color 2,
7(8) t_data-hkont color 2,
18(10) t_data-lifnr color 2,
105(5) t_data-waers color 2.
*for totals
line[] = t_data[].
loop at line where lifnr = t_header-lifnr.
if line-shkzg = 'H'.
l_debit = l_debit + line-wrbtr.
endif.
if line-shkzg = 'S'.
l_credit = l_credit + line-wrbtr.
endif.
endloop.
l_balance = l_debit - l_credit.
write:115(15) l_debit color 3. write:135(1) 'D' color 3.
write:/115(15) l_credit color 3. write:135(1) 'C' color 3.
*for balnce
write:/90(25) 'Bal.:' color 3.
write:115(15) l_balance color 3.
clear: l_debit,l_credit,l_balance.
uline.
endloop.
endform. "process_data
*& Form set_page_header
text
FORM set_page_header.
call function 'Z_REPORT_TITLE'
EXPORTING
line_size = sy-linsz
sy_title = 'List of Vendor Line Items'
uline = 'X'
first_page_only = ' '.
write :1(15) 'Allocation' color col_heading,
15(10) 'Pstng' color col_heading,
25(5) 'Do' color col_heading,
30(10) 'Documnet' color col_heading,
40(10) 'Doc' color col_heading,
50(8) 'BusA' color col_heading,
58(5) 'LIm' color col_heading,
63(4) 'PK' color col_heading,
67(4) 'S' color col_heading,
71(4) 'P' color col_heading,
75(7) 'Clrg' color col_heading,
82(10) 'Clearing' color col_heading,
92(20) 'D/c discount Amnt' color col_heading,
112(5) 'Rsn' color col_heading,
117(2) 'G' color col_heading,
119(7) 'Curr-' color col_heading,
126(12) 'Amount in' color col_heading,
138(2) 'T' color col_heading.
write space.
write :1(15) 'number' color col_heading,
15(10) 'date' color col_heading,
25(5) 'ty' color col_heading,
30(10) 'number' color col_heading,
40(18) 'date' color col_heading,
58(5) '' color col_heading,
63(4) '' color col_heading,
67(4) 'I' color col_heading,
71(4) 'K' color col_heading,
75(7) 'date' color col_heading,
82(24) 'doc.no' color col_heading,
105(20) 'in LC' color col_heading,
112(5) 'code' color col_heading,
117(2) 'L' color col_heading,
119(7) 'ency' color col_heading,
126(12) 'doc.curr.' color col_heading,
138(2) 'X' color col_heading.
write space.
uline.
ENDFORM. " set_page_header
Similar Messages
-
How to restrict Option values for a particular metadata in profile checkin
How to restrict Option values (drop down) for a particular metadata in profile checkin-
Metadata field Color is having options dropdown values (stored in table/views)-
Display name - Blue, Value=1
Display name - Red, Value=2
Display name - Yellow, Value=3
Display name - Green, Value=4
Display name - Black, Value=5
For a particular profile checkin form, for the metadata field Color I want the dropdown value consist of only top three options
Display name - Blue, Value=1
Display name - Red, Value=2
Display name - Yellow, Value=3
But this should be done on profile level only, should not impact the standrad checkin form and other profile checkin forms.
Please help me if any one having any suggestion to implement the above secnario
Thanks,
SumitHi,
Into the rule containing the Color metadata, you can restrict the values of the list.
In "Has restricted list and pane", list the values 1, 2 and 3 (new line for each value) :
1
2
3
Romain. -
Everyone is how to delete repeating values?
There is a column,values are repeated,everyone is how to delete repeating values?
Assuming that this set of numerical many, can not directly determine whether there is a duplicate value.
Thank you~
Message was edited by: Tao.
Message was edited by: Tao.Hi Tao,
I've found that a short AppleScript provides a convenient way to identify duplicates (repeating values) in a range.
Just select the range of cells you want to check for duplicates and click. It will turn the duplicates red.
--select range, run, turns duplicates red
tell application "Numbers" to tell front document to tell active sheet
set selected_table to first table whose class of selection range is range
tell selected_table
set selected_range to the selection range
tell selected_range
set values_list to {}
repeat with i from 1 to count cells
set this_value to value of cell i as text
if values_list contains this_value then set text color of cell i to "red"
set end of values_list to this_value
end repeat
end tell
end tell
end tell
--end of script
Just copy and paste the above script into AppleScript Editor, and run it from there. Or place it in your scripts menu. Or download this Automator Service (Dropbox download) and double-click it to install it in your Services menu.
Similarly, if you want to get a list of just the distinct values in a range (i.e. with duplicates removed) this Copy Distinct Automator Service (Dropbox download) is very convenient.
Select the cells, make the menu pick, then paste the distinct values wherever you want in a table by single-clicking a cell and typing command-v to paste.
These functions become, in essence, a customized menu. That way you don't have to set up formulas to do this each time you work with a new Numbers document.
SG -
How to restrict the values in seach helps
Dear All,
I am new to the BSP concept.I have a requirement
where in the BSP i need to restrict the values of the search help.i.e. 2 values are coming in the help i need to display only 1 value.
can anybody please explain how to do it.
Cheers,
Deepthee Kasal
Edited by: Craig Cmehil on Sep 2, 2008 8:21 AMHi,
I assume that you read values for the search help with function 'F4IF_FIELD_VALUE_REQUEST' and in a later step you display values with <htmlb:tableview>. If that is true and the function is delivering too many records as you mention, you could then restrict the output table of values like this:
TABLES mara.
DATA: mytable TYPE TABLE OF ddshretval WITH HEADER LINE.
DATA l_repid TYPE syrepid.
PARAMETERS p_mtart LIKE mara-mtart.
AT SELECTION-SCREEN ON VALUE-REQUEST
FOR p_mtart.
l_repid = sy-repid.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'MARA'
fieldname = 'MTART'
dynpprog = l_repid
callback_program = l_repid
callback_form = 'F4CALLBACK'
TABLES
return_tab = mytable
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
START-OF-SELECTION.
blah, blah, blah
* Form F4_form
* Exclude all material types that start with F & H
FORM f4callback
TABLES record_tab STRUCTURE seahlpres
CHANGING shlp TYPE shlp_descr
callcontrol LIKE ddshf4ctrl.
DATA: aux_struc TYPE ddshselopt.
MOVE: 'H_T134' to aux_struc-shlpname,
'MTART' TO aux_struc-shlpfield,
'E' TO aux_struc-sign,
'CP' TO aux_struc-option,
'F*' TO aux_struc-low.
append aux_struc to SHLP-SELOPT.
MOVE: 'H_T134' to aux_struc-shlpname,
'MTART' TO aux_struc-shlpfield,
'E' TO aux_struc-sign,
'CP' TO aux_struc-option,
'H*' TO aux_struc-low.
append aux_struc to SHLP-SELOPT.
ENDFORM. "F4_form
Mark points if helpful -
How to restrict the values during extraction?
Hi everyone,
I want to restrict the values while extracting data from R/3 Datasource... For example:
I have MATNR, which have around 10 materials out of which i want to extract the data for only 5 materials. My Selection screen is disabled, i mean we cant do anything in selection screen... Can anyone plz tell me how to go abt this issue?
Advance thanks,
chintu..Hi KJ,
Am saying that its not available in Selection screen in R/3 side.. am not talking abt the BW side.. Then also i want to extract the data.. How to do this? this is an interview question asked by HP today morning..
Regards,
Chintu. -
Hello Experts,
I got a basic question to ask. Iu2019ve created a custom table and then attached a check table with one of its field. This field is not PK. Now through help u2018F4u2019 I can see the values coming from check table. But other then those values let say if I enter any data (any garbage) it is getting stored in the table. Can somebody tell me how to restrict this field so that user must have to select the values from the list not on his own?
ThanksDo a validation of the input that the user gives.
Select single xxx from Ztable
where xxx ( eq selection screen parameter )
( IN select options )
If Sy-subrc eq 0.
Through an error message
Message e000 'Pls enter a correct value for the XXX '
Endif.
The whole code should be under AT selection screen event.
i guess you will agree with this solution.
Thanks,
Karthik -
How to Restrict F4 values for Std Field
Hi ,
I need to restrict the F4 values of a standard field from a standard t-code.
Example:
In standard t-code : XD01 .
If i press F4 on company code field , i shows all the company codes exists from table , like : 1000 , 2000 , 3000 ...etc..,
But, My requirement is : I want the restrict the values .
Say , I need to show only 1000 & 3000 company codes when he press F4 on company code field on XD01 or XK01 ,
where ever the Comapny Code field (BUKRS) is used.
Answers will be rewardedHi Lakshman,
Me to aware of search help exit...
If i do for search help level , it affects only 1 field of 1 transaction.
Say Example: If i have search help exit for BUKRS field in XD01 t-code , it will not affect in t-code XK01 , since Xk01 BUKRS
field uses some other Search help...
I need to know , if we set once for BUKRS field .. will it affect on all T-Codes..
Is there any way to do it
Edited by: Surendar on May 6, 2010 2:38 PM -
How to restrict redundant value in report while using left outer urgent
Hi frineds
i am developing pp report,
i am using the select query,
the output instead of one i ,got two for every one
ex reason badm-- onlyone
but igives badm
badm
SELECT FMATNR FAUFNR FPSMNG GXMNGA GPERNR GBUDAT GGRUND GVORNR GAUFPL GIEDD H~GRDTX INTO CORRESPONDING FIELDS OF TABLE IT_AFPO_IDEL
FROM AFPO AS F
INNER JOIN AFRU AS G ON FAUFNR = GAUFNR
INNER JOIN TRUGT AS H ON GGRUND = HGRUND
LEFT OUTER JOIN TRUGT AS H ON GGRUND = HGRUND
WHERE F~MATNR IN S_MATNR AND
F~AUFNR IN S_AUFNR AND
G~ISDD IN S_ISDD AND
G~IEDD IN S_IEDD AND
G~WERKS IN S_WERKS AND
G~XMNGA <> 0 .
how can i restrict ,give me solution ,very urgent
Thanks in advance
Regards
dsHi Chandran,
I got that Idea too. I created a authorized customer, I created a authorized Object and assigned to a role.But in the role, when I am changing the object to generate profile, it is asking to select list of customers from the customer table.If the customers are always constant then this would work, but in my scenario, customers for the sales rep changes over time and when I ever reps open the query, they should see updated list of customers assigned to them only, as we update the master data everyday from source system and that shud reflect in the value help.
I am trying User Exit to achieve this, but I am not getting proper ideas how to do this.
Any Help on this issue with user exit code???
Thanks in Advance
regards,
PNK -
How to remove the repetition of values for a particular column ?
eg:
product brand date
laptop hp 8/1/2013
laptop dell 8/1/2013
laptop hp 8/1/2013
I don't want " laptop" to appear thriceHi,
Go to Product Column Properties >> click on column format >> there u can see two radio buttons Suppress and Repeat >> click on suppress radio button >>
click OK >> click on results tab >> there u can see the only one laptop under product column.
Mark If Helpful/correct.
Thanks. -
Dear All,
I have main query..And i written a Query for Issued Quantity.
The query is retrieving exact data. And when i add the Query in main query the data is coming with extra null values.
for ex. Query for Issued Qty fetchs 16 records.
and i run the main query it fetchs 20 records...there r 4 records which issued Qty is null.
How can i restrict that records.
Thanks.Shahabuddin wrote:
Dear All,
I have main query..And i written a Query for Issued Quantity.
The query is retrieving exact data. And when i add the Query in main query the data is coming with extra null values.
for ex. Query for Issued Qty fetchs 16 records.
and i run the main query it fetchs 20 records...there r 4 records which issued Qty is null.
How can i restrict that records.
Thanks.How about showing us the query? If you have an outer join condition between the tables, that would account for the NULL qty in the 4 "extra" rows. In that case, you'd want to remove the outer join from the query.
Cheers, -
How to delete repeated values in smartforms
Hi
im using smartform.....
im getting the correct value, but whenever there is a blank value , then it is taking previous value instead of blank data...
how to come out of this problem?
Regards
SmithaHi Smitha,
It seems you are not clearing the variable or structure of that field.
Please clear it before the ENDLOOP.(If loop is used).
Regards,
Vimal. -
How to restrict some values in the final report output.
Hi Experts,
I have scenario where I dont want to include the values in the output of report.
If you observe above there are some un assigned cost elements and its the report output. I dont want these to be in the report.
Please suggest me.
Thanks,
RaviHi Friends,
Thank you for the reply.
I tried to exclude the values, but i dont find any chance to exclude them
If i try the same from characteristic restriction, its allowing me to exclude.
Is there any other possibility to restrict these? Please suggest -
Group by - How to merge repeated values in reports?
Hello,
I am trying to build a report in OBIEE 10g using sum (AmountSold by CalendarYear) in one of the columns. The result is this:
[http://postimage.org/image/2gvvw8qv8/]
What I really need is to "merge" together the repeated columns by year, so it looks like the following:
[http://postimage.org/image/9bp1gskk/]
Is there a way to achieve this? Thank you!
João Vitor MoreiraHi,
sum(amount_sold) -> Column properties-> column format->select suppress or default under value suppression
if default is selected then try to exchange the columns Sum(Amount_SOLD) and Amount_SOLD
Cheers,
Aravind -
How to restrict decimal values upto two decimal places?
Hi all,
I want to restrict decimal figures upto two places. How to do that? Help will be appreciated.
atanu
[email protected]You can use NumberFormat class.
There are lot of threads available in this forum. Just search for the keyword 'NumberFormat'. -
How to restrict decimal values in Project Management JSP pages
Hi,
By default, the values of effort % complete, % complete, Earned Value etc show 8 digits after decimal in Progress Update Overview page.
We want to round off these values to two digits.
How can this be achieved? Please suggest.Hi 977941,
Please set the following properties for a field and check for decimal point
Action Type : firePartialAction
Event : validateInteger
Create a controller and add the following in Process From Request :
if ("*validateInteger*".equals(pageContext.getParameter(EVENT_PARAM))) // identifier should be same as what you have set .
get the value here and check if the decimal exist and throw exception message .
Thanks
Sandeep
Maybe you are looking for
-
How to add a Font Button in the Top of the Help File
Dear all, In some of the Help Files (HTML Help), i've seen a Font button being added in the top of the Help File (for e.g next to Home button)...when we click this font button, the font size of the Content present in the Help File Increases/decreases
-
How to use switch condition in XMII??
Hi , I am not able to find the output path for the match values of switch statement. Please explain in detail.
-
Fairly simple fix for dv6000 power button, microphone, internal speaker problems
I have a dv6000 notebook computer, S/N CNF6380XM1, P/N EZ829AV. Over time (I've had the computer for almost 4 years) the power button, internal speakers, and microphone became increasingly flaky and eventually stopped working altogether. Classic sig
-
Differences between the Mapping types.
Hi, I have a query we are using the diff types of mappigs i.e. 1 Graphical Mapping 2. Java Mapping 3 XSLT Mapping 4 ABAP Mapping. what are the differences in the above types and davantages and disadvanteages.
-
Can't account for this change, but all of a sudden, the menu on my iPod starts with "Photos." It will play if I go to "shuffle," but I can't get to the "music" menu. It's fully charged, has been reset, has most recent software update... Any ideas?