Trying to reference field name of my record Type in my procedure!
Hello,
I am stuck. I am trying to reference field names in my record type declared in my Package declaration.
Here is an example. Don't be scared, it's a very simple package. I just need some directions what to use to accomplish this.
--look into this part of the package body
FOR cur_rate IN c_rate
LOOP
rate_data(1).field_name := cur_rate.rate_pct;
--field name = AK_PCT, AL_PCT and so on ...
END LOOP;
END rate_tab_qry;
CREATE OR REPLACE PACKAGE rate_pkg IS
TYPE rate_rec IS RECORD (
id cycle_rates.id%TYPE
,cycle cycle_rates.cycle%TYPE
,scac cycle_rates.scac%TYPE
,gbloc cycle_rates.gbloc%TYPE
,code cycle_rates.code%TYPE
,AK_PCT cycle_rates.rate_pct%TYPE
,AL_PCT cycle_rates.rate_pct%TYPE
,AR_PCT cycle_rates.rate_pct%TYPE
,so on...
TYPE cycle_rate_tab IS TABLE OF rate_rec INDEX BY BINARY_INTEGER;
PROCEDURE rate_tab_qry(rate_data IN OUT cycle_rate_tab,
p_id cycle_rates.id%TYPE,
p_cycle cycle_rates.cycle%TYPE,
p_scac cycle_rates.scac%TYPE,
p_gbloc cycle_rates.gbloc%TYPE,
p_code cycle_rates.code%TYPE);
END;
CREATE OR REPLACE PACKAGE BODY rate_pkg IS
PROCEDURE rate_tab_qry(rate_data IN OUT cycle_rate_tab,
p_id cycle_rates.id%TYPE,
p_cycle cycle_rates.cycle%TYPE,
p_scac cycle_rates.scac%TYPE,
p_gbloc cycle_rates.gbloc%TYPE,
p_code cycle_rates.code%TYPE)
IS
CURSOR c_rate IS
SELECT state, rate_pct
FROM cycle_rates
WHERE cycle = p_cycle
AND scac = p_scac
AND gbloc = p_gbloc
AND code = p_code;
BEGIN
rate_data(1).id := p_id;
rate_data(1).cycle := p_cycle;
rate_data(1).scac := p_scac;
rate_data(1).gbloc := p_gbloc;
rate_data(1).code := p_code;
FOR cur_rate IN c_rate
LOOP
rate_data(1).field_name := cur_rate.rate_pct;
--field name = AK_PCT, AL_PCT and so on ...
END LOOP;
END rate_tab_qry;
I need to know, how to reference my field name for each state in my procedure that are in my record type. The problem is it won't allow me to use something like this.
select state || '_PCT
from cycle_rates;
which would eventually show me each state concatenated with '_PCT, e.g. AK_PCT and that's my field names.
For example,
FOR cur_rate IN c_rate
LOOP
rate_data(1).field_name := cur_rate.rate_pct;
--field_name = AK_PCT, AL_PCT and so on...
END LOOP;
I would appreciate it if somene can direct me. Thanks.
Message was edited by:
[email protected]
This is a sample output from my cusror. Just to make it easier for you guys to see it.
ST RATE_PCT
AK 0
AL 2
AR 2
AZ 2
CA 2
CO 2
CT 2
DC 2
DE 2
FL 2
Hope it helps.
Similar Messages
-
I'm working on two sheets, one with all the nitty-gritty details of my bills, the other a summary.
When I wanted to put an if() formula that reads a cell in the summary sheet to read from one field in the details screen the Field Name changes. It was working on most of the fields until I got to one set of them then this happened:
when I put in
=IF('Bill/Exp Comparator' :: '12/29/09' J C Penney="","",'Bill/Exp Comparator' :: '12/29/09' J C Penney)
and hit enter I'd get
=IF('Bill/Exp Comparator' :: '12/29/09' '3/9/10' C Penney="","",'Bill/Exp Comparator' :: '12/29/09' '3/9/10' C Penney)
I would delete the '3/9/10' and hit enter again, it would change back to it. I don't know why is it doing it with one field or how to stop it.
This is another reason why I should stick to a Windows' product.MWSibert wrote:
2. I don't know what you mean by:
<startupVolume>:Users:<yourAccount>:Library:Preferences:com.apple.iWork.Numbers. plist
<startupVolume>:Users:<yourAccount>:Library:Preferences:com.apple.iWork.Numbers. LSSharedFileList.plist
These are the paths to two preferences files that could be causing the abnormal behaviour.
Go to the Finder, open a new Finder Window.
In the sidebar, the house icon with your (user)name under it is <yourAccount>. Start there with a double click or single click, depending which view (icons, list or columns) you are using in the Finder Window, to open that item. In the new list that opens, repeat with the next item (Library) in the path.
The last item in the path is a preferences file, identified by the .plist suffix on the filename.
Preferences files are constantly being read, changed and written to by the application, and occasionally become corrupted. Deleting them is a common 'first aid' step. The application (Numbers in this case) will create a new, clean copy of the file when the need arises.
if this is using a script, I'm not practiced at that, and the "LSSharedFileList" part bugs me. "share" with what, where, whom? Is this opening my computer to others without my knowledge?
If your profile is correct (it says you are using Mac OS X v10.4.11), you are unlikely to find the second file (com.apple.iWork.Numbers.LSSharedFileList.plist). This is a file associated with Launch Services, and was introduced in OS X v 10.5. It's on Yvan's machine as he has Numbers set up to Launch as one of his log in items.
I don't mind emailing a template because it's nothing impressive to anybody. Would you mind if I send a template?
Go ahead. Please put "Numbers Ref Field Changes" in the subject line. My address is available in my profile—click my neme to the left of this message to get there.
Regards,
Barry -
Auto-populating fields based on another field (must access dif record type)
This is a long one. I basically want to know if it's possible to have several fields auto-populated based on the data in another. It gets a little tricky here, because the information I want to auto-populate will have to be searched for in another record type. An example will hopefully make my request clear:
I have 10's of thousands of records of the "Product" record type that each have a product number. Well, let's say I have several fields to enter into an "Opportunity" record type, based on the information for this product number in the "Products" record type. I want to know if I can enter the product number on the "Opportunity" record, and have OnDemand go look up this product number in the "Product" record type, pull information from that record, and auto-populate that additional information in certain fields back on the "Opportunity" record that I am entering information for.
I know a workflow can do this on simple things where you have a few different part numbers and can create a workflow for each, but I literally have 40k part numbers, and I can't very well create that many workflows. If there was a way to dynamically script the workflow to use the part number in the field on the "Opportunity" record and go fetch the data to auto-populate, that would be nice.
I also can't use a cascading picklist because, again, there are around 40k products records and picklists have a limit to how many choices you can have.
My think tank has run empty, and I am out of ideas. I was wondering if there is any other way to get this done, or if it's even possible?
Thanks,
B
Edited by: user10885599 on Feb 5, 2009 11:54 AMAs I read this, I am wondering if you would be able to use the new JoinFieldValue() function to update the fields. The problem is that the Opportunity record does not have a direct link to products. The Revenue table does however, so you should be able to do this from Revenue, if that is how you are using the application.
The process would be to create a workflow that watches for new Revenue records, and updates the new fields in the Revenue object using the JoinFieldValue function to pull the data. -
How to register OUT param to RECORD type for STORED PROCEDURE???
hi
i have a SP like this
CREATE OR REPLACE PACKAGE P1 AS
TYPE g_con_ref_cursor is REF CURSOR ;
TYPE g_con_error IS RECORD
error_code NUMBER,
error_desc varchar2(2000)
PROCEDURE PROC_CURSOR
(i_str_userid IN VARCHAR2,
o_cur_ref_cur OUT g_con_ref_cursor,
o_rec_error OUT g_con_error,
o_num_status OUT NUMBER);
END;and now i am trying to call this SP using my java program
i am able to register the out put params for 2nd and 4 th variable
my doubt is how i can register the output param for 3rd (g_con_error) which is of record type
and how i can get result from this ????
my java program is like this
Connection connection = DatabaseHelper.prepareConnection();
CallableStatement proc = connection.prepareCall("{ call P1.PROC_CURSOR(?, ?, ?, ?) }");
proc.setString(1,"jn26557");
proc.registerOutParameter(2,oracle.jdbc.driver.OracleTypes.CURSOR);
proc.registerOutParameter(3,???,????); //HOW TO SET THIS ?????
proc.registerOutParameter(4,oracle.jdbc.driver.OracleTypes.NUMERIC);
proc.execute();plz help me in this
i have no idea how to do it
any help would be appreciated
Thanks in advance
Jaya Prakash NalajalaYou might give a try using:
proc.registerOutParameter(3, java.sql.Types.REF, "RECORD"); -
PL/SQL Passing record type between two procedures
I have a package and package body as following
My problem is I forgot the syntax to pass the record type between the two procedure.?????
CREATE OR REPLACE PACKAGE Standby_Schedules_Disp
AS
PROCEDURE Get_schedule (test1 OUT VARCHAR2);
PROCEDURE get_test (my_test REF my_sched); DOESN'T WORK?????
END Standby_Schedules_Disp;
CREATE OR REPLACE PACKAGE BODY Standby_Schedules_Disp
AS
PROCEDURE Get_schedule (test1 OUT VARCHAR2)
AS
temp NUMBER;
TYPE my_sched IS RECORD ( my_name VARCHAR2(30) := NULL,
my_age NUMBER := 0);
who_I_am my_sched;
Get_test(my_sched);
BEGIN
test1 := 'aaaaa';
who_i_am.my_name := 'Matthew';
END get_schedule;
PROCEDURE get_test (my_test REF my_sched) DOESN'T WORK?????
AS
BEGIN
END;
END Standby_Schedules_Disp;
/Youv'e declared the my_sched type within the scope of the Get_schedule procedure - it's not visible to the get_test procedure. You have declare the type in the package body if it's only used internally within the package or in the package spec if it can be referenced outside the package:
CREATE OR REPLACE PACKAGE [BODY] Standby_Schedules_Disp
AS
TYPE my_sched IS RECORD (
my_name VARCHAR2(30) := NULL,
my_age NUMBER := 0);I don't understand what you are trying to do with the REF keyword in this context. Having declared the type, you can use it as normal in a parameter spec:
PROCEDURE get_test (my_test IN [OUT] my_sched);You're also trying to call get_test within the declaration section of a program, which you can't do, and get_test also contains no executable code, which is not allowed in PL/SQL. -
The table structure for the system can be changed through the front-end, so I am using a record structure with the %ROWTYPE functionality to pick up these changes. Data is received from an external source which has to update this data. What I would like to do is assign a value to a field name within the record that matches a particular pattern rather than stating the exact field name (which I will not necessarily know at the time of writing the code as it is a constantly changing table strucure) so for example I would like to write, something to this effect:
SELECT utc.columnname
FROM user_tab_columns utc
INTO v_team
WHERE utc.columnname like '%TEAM%';
myrecord.v_team = 'SomeValue';
Currently this won't compile as v_team does not exist it is the value within v_team I want to use. Is there a solution to this or does anyone have any alternative methods?
Thank you
EmmaIs the following your requirement. I have created tableA as a source of data.
SQL> select * from tableA;
TEAM AREA
red A
blue B
green C
SQL> select * from tableB;
no rows selected
SQL> declare
2 str1 varchar2(50) := 'insert into tableB ( ';
3 str2 varchar2(300) ;
4 str3 varchar2(20) := ' ) values (';
5 str4 varchar2(200);
6 str5 varchar2(10) := ')';
7 begin
8 for rec in (select * from tableA) loop
9 str2 := str2||rec.team||'_area ,';
10 str4 := str4||''''||rec.area||''',';
11 end loop;
12 str2 := substr(str2,1,length(str2)-1);
13 str4 := substr(str4,1,length(str4)-1);
14 dbms_output.put_line(str1||str2||str3||str4||str5);
15 execute immediate str1||str2||str3||str4||str5 ;
16 end;
17 /
insert into tableB ( red_area ,blue_area ,green_area ) values ('A','B','C')
PL/SQL procedure successfully completed.
SQL> select * from tableB;
ID RED_A GREEN BLUE_
A C B
SQL> -
In sets (t-code GS01-04): How to change Field name
HI,
I have created sets for rule in validation by t-code GS01. Where I have given Tbale name BSEG and Field name KOSTL(Cost Center No). Now, I want to change field name SAKNR (GL NO) instead of cost center. When I am trying to change field name t-code GS02, there is field name is in display mode and no way to change it.
As I have lot of entries in each set, so that creation of new sets is very hard job again. Further when I trying to create new sets by reference it didnt change the table name and field name.
Please provide me a solution.
KhalidHi,
Hope it is not possible, logically total field is changing and the dependent entrie will not stay as it is. I don't think this is possible.
Eventhough the values are same but the fields are different.
VVR -
Can a field validation point to fields of another record type?
Field Validation based on another Record Type Field
I am trying to build validation into a custom object that sums fields under the Account record type.
The names of the fields from OBI (the table location and field name):
"- Account Custom Metrics".S_INT_13+"- Account Custom Metrics".S_INT_14+"- Account Custom Metrics".S_INT_11
My questions: can a field validation point to fields of another record type? My thought was that if OBI can look across record types than all of CRM should be able to, including field validations.
Thank you,
DavidHi !
I'm afraid this is not possible for the moment. You'll have to wait for the Release 16 I think to have such possibilities.
The R16 will allow you to create workflow rules accross different record types (e.g. Create a task on the Account linked to the service request when a new service request is created). I hope there will be the same possibilities with the validation rules...
Hope this will help, feel free to ask more.
Max -
Table Names & Field Names in FS for ABAP
What is the easiest option to find out Table & Field Names normally asked by ABAP Consultant through Functional Specs?
Any specific tips to find specific table names & field names?T000 Clients
T001 Company Codes
T001E Company code-dependent address data
T001P Personnel Areas/Subareas
T500L Personnel Country Grouping
T500P Personnel Areas
T500T Personnel Country Groupings
T501 Employee Group
T501T Employee Group Names
T502T Marital Status Designators
T503 Employee Groups / Subgroups
T503K Employee subgroup
T503T Employee Subgroup Names
T504A Benefits - Default Values (NA)
T504B Benefit Option Texts (North America)
T504C Benefit Type (NA)
T504D Benefit Credit Group Amount
T504E Benefit Amount
T504F Benefit Costs
T508A Work Schedule Rules
T508T Texts for Employee Subgroup Groupings for Work Schedules
T510 Pay Scale Groups
T510A Pay Scale Types
T510F Assign Pay Scale > Time Unit, Currency
T510G Pay Scale Areas
T510H Payroll Constants with Regard to Time Unit
T510I Standard Working Hours
T510J Constant Valuations
T510L Levels
T510M Valuation of pay scale groups acc. to hiring date
T510N Pay Scales for Annual Salaries (NA)
T510S Time Wage Type Selection Rule
T510U Pay Scale Groups
T510Y Special Rules for Wage Type Generation
T511 Wage Types
T512R Cumulation Wage Types in Forms
T512S Texts for Cumulation Wage Types in Forms
T512T Wage Type Texts
T512W Wage Type Valuation
T512Z Permissibility of Wage Types per Infotype
T513 Jobs
T514S Table Name Texts
T514T Field Name Texts
T51D2 Wage Type Classes
T51D3 Reduction Rules
T51D4 Cumulation Rules
T527X Organizational Units
T528B Positions - Work Centers
T528C Wage Type Catalog
T528T Position Texts
T529A Personnel Event
T529F Fast Data Entry for Events
T529T Personnel Event Texts
T52BT Texts For HR Objects
T52C0 Payroll Schemas
T52C1 Payroll Schemas
T52C2 Texts for Personnel Calculation Schemas
T52C3 Texts for Personnel Calculation Schemas
T52C5 Personnel Calculation Rules
T52CC Schema Directory
T52CD Schema Directory
T52CE Directory of Personnel Calculation Rules
T52CT Text Elements
T52CX Cross References via Generated Schemas
T52D1 Valid Processing Classes
T52D2 Valid Values for Processing Classes
T52D3 Valid Evaluation Classes
T52D4 Permitted Values for Evaluation Classes
T52D5 Wage Type Groups
T52D6 Wage Type Group Texts
T52D7 Assign Wage Types to Wage Type Groups
T52D8 Valid Processing Classes - Texts
T52D9 Valid Values for Processing Classes - Texts
T530 Reasons for Events
T530E Reasons for Changes
T530F Reasons for Changes
T530L Wage Types for Special Payments
T530T Event Reason Texts
T531 Deadline Types
T531S Deadline Type Texts
T533 Leave Types
T533T Leave Type Texts
T539A Default Wage Types for Basic Pay
T539J Base Wage Type Valuation
T539R Events for Standard Wage Maintenance
T539S Wage Types for Standard Wage Maintenance
T548 Date Types
T548S Date Conversion
T548T Date Types
T548Y Date Types
T549A Payroll Areas
T549B Company Features
T549C Decision Trees for Features (Customers)
T549D Feature Directory
T549L Date modifiers
T549M Monthly Assignment: Payroll Period
T549N Period Modifiers
T549O Text for date modifier
T549P Valid Time Units for Payroll Accounting
T549Q Payroll Periods
T549R Period Parameters
T549S Payroll date types
T549T Payroll Areas
T549M Monthly Assignment: Payroll Period
T549N Period Modifiers
T549O Text for date modifier
T549P Valid Time Units for Payroll Accounting
T549Q Payroll Periods
T549R Period Parameters
T549S Payroll date types
T549T Payroll Areas
T554S Absence and Attendance Types
T554T Absence and Attendance Texts
T554V Defaults for Absence Types
T554Y Time Constraints in HR TIME
T555A Time Types
T555B Time Type Designations
T559A Working Weeks
T559B Name of Working Week
T572F Event Texts
T572G Allowed Values for Events
T572H Event Value Texts
T582A Infotypes
T582B Infotypes Which Are Created Automatically
T582S Infotype Texts
T582V Assignment of Infotypes to Views
T582W Assigns Infotype View to Primary Infotype
T582Z Control Table for PA Time Management
T584A Checking Procedures - Infotype Assignment
T588A Transaction Codes
T588B Infotype Menus
T588C Infotype Menus/Info Groups
T588D Infogroups for Events
T588J Screen Header Definition
T588M Infotype Screen Control
T588N Screen Modification for Account Assignment Block
T588O Screen Modification for Assignment Data
T588Q Screen types for fast entry
T588R Selection Reports for Fast Data Entry
T588S Screen Types for Fast Entry
T588T Menu and Infogroup Designations
T588V Business object type
T588W Event types for infotype operations
T588X Cust. composite definition of event types for IT operations
T588Z Dynamic Events
T591A Subtype Characteristics
T591B Time Constraints for Wage Types
T591S Subtype Texts
T596F HR Subroutines
T596G Cumulation wage types
T596H _Cumulation wage type texts
T596I Calculation rule for cumulation wage types
T596U Conversion Table
T599B Report Classes
T599C Report Classes
T599D Report Categories
T599F Report Classes - Select Options
T777A Building Addresses
T777T Infotypes
T777Z Infotype Time Constraints
T778T Infotypes
T778U Subtypes
CATSCO Cross-Application Time Sheet (CATS)- Transfer to CO
CATSDB CATS- Database Table for Time Sheet
CATSHR Cross-Application Time Sheet (CATS)- Transfer to HR
CATSMM Cross-Application Time Sheet (CATS)- Transfer to MM
CATSPM Cross-Application Time Sheet (CATS)- Transfer to PM/CS
CATSPS Cross-Application Time Sheet (CATS)- Transfer to PS -
Reference field in SA accounting document
Hi Friends,
Got a requirement, to avoid populating the reference field in accounting field only for type SA (G/L account document). So, while creating through VBOF, I am debugging to findout the place where the field is getting populated.
Can anyone help me to understand on how it is getting copied from invoice? Is there any userexits to achieve the same?
Thanks in advance.Hi,
yes it is possible to change the refernce field in teh accounting document once posted.
You ahve to mantain Rules for Changing Documents in SPRO.
The path is ING--Financial Accounting (New)Financial Accounting Global Settings (New)DocumentRules for Changing Documents--Document Change Rules, Document Header
Here amke a new entry as below
Field NAme BKPF-BKTXT
Account type blank
Tarnsaction Type blank
Company code Blank
Check the box for "Field can be changed"
Hoe this helps
Reagrds
Pratiksha
*Assign Points if useful -
How to create a LookUp field, selecting a value from another record type ??
Hello all,
I am looking to create a new field in Opportunity in CRM On Demand where we can give the user an option to select one of the records. Data in this search applet should come from another Record Type in CRM On Demand. I am not able to find any similar literature in the Help books.
I would appreciate if somebody could give me real life steps please.
Thanks a lotOkay. I found the solution to this.
Now, along with this single reference, we also wish to bring the values of some more joined fields from the other record type in the Opportunities screen.
We were hoping that the Default value, and using fx, we should be able to achieve this using "joinedfieldvalue". However, it's not bringing back any value. Our expression is -
JoinFieldValue('<CustomObject3>',[<CustomObject3Id>],'<stState_ITAG>')
Please help if you have done this before.
Thanks & Regards -
Reference field require for maintaining percentage
hi ,
In the module pool program , on selection screen I want to give percentage value, we are using KBETR field but it is accepting only comma seperated values like 1,11 not accepting 1.11.If I change decimal settings in user profile then it accepts 1.11.
Could you please suggest a reference field which will accept both types of values.
Thanks
SaurabhUse:
Data: w_percentage type p decimals 2.
Data Element: BF_PRZ32
This will solve the issue.
Regards,
Gurpreet -
Hi all,
While I am writing a program for object model listing, I need to get "Short Description" for each fields. I can get Field name, Data Element, Length, Type, Decimal but not Short Description. I thought it is DD03T-DDTEXT. But cannot get the data. Can anyone tell me how can I get the data?
Regards,
Nathan
Will Reward if useful.hi .. here is the program to get the values and text of the domain
report Z_FIND_DOMAIN_FIXED_VALUES.
tables : DD03L . " txw_c_soex .
type-pools: slis.
TYPES : BEGIN OF ty_tables,
FIELDNAME LIKE DD03L-FIELDNAME ,
* include structure DD03L . "txw_c_soex.
END OF ty_tables.
TYPES : tt_xdfies TYPE TABLE OF dfies.
TYPES : tt_tables TYPE TABLE OF ty_tables.
DATA : gt_tables TYPE TABLE OF dd07v ,
gt_dart_tables TYPE tt_tables,
gs_tables LIKE LINE OF gt_tables,
gs_dart_tables LIKE LINE OF gt_dart_tables.
DATA : lt_values TYPE TABLE OF dd07v,
ls_values LIKE LINE OF lt_values ,
lt_values1 TYPE TABLE OF dd07v,
ls_values1 LIKE LINE OF lt_values1.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*select-options: s_struct for txw_c_soex-src_struct.
select-options: s_FIELD for DD03L-FIELDNAME.
*SELECT src_struct FROM txw_c_soex INTO TABLE gt_dart_tables Where
* src_struct in
*s_struct
select FIELDNAME from DD03L iNTO TABLE gt_dart_tables Where
FIELDNAME in
s_FIELD
SORT gt_dart_tables BY FIELDNAME . "src_struct.
DELETE ADJACENT DUPLICATES FROM gt_dart_tables COMPARING FIELDNAME .
"src_struct.
LOOP AT gt_dart_tables INTO gs_dart_tables.
* PERFORM get_checktable USING gs_dart_tables-FIELDNAME .
CALL FUNCTION 'DD_DOFV_GET'
EXPORTING
GET_STATE = 'M'
LANGU = SY-LANGU
* PRID = 0
WITHTEXT = 'X'
DOMAIN_NAME = gs_dart_tables-fieldname
" ls_xdfies-FIELDNAME
* IMPORTING
* GOT_STATE =
TABLES
DD07V_TAB_A = lt_values
DD07V_TAB_N = lt_values1
* EXCEPTIONS
* ILLEGAL_VALUE = 1
* OP_FAILURE = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT Lt_values by DOMNAME DDLANGUAGE VALPOS .
loop at lt_values into ls_values .
move-corresponding ls_values to gs_tables .
append gs_tables to gt_tables .
endloop .
CLEAR : lt_values , ls_values , gs_tables .
SORT Lt_values1 by DOMNAME DDLANGUAGE VALPOS .
loop at lt_values1 into ls_values1 .
move-corresponding ls_values1 to gs_tables .
append gs_tables to gt_tables .
endloop .
CLEAR : lt_values1 , ls_values1 , gs_tables .
*endloop .
ENDLOOP.
SORT gt_tables BY DOMNAME DDLANGUAGE VALPOS .
DELETE ADJACENT DUPLICATES FROM gt_tables COMPARING DOMNAME VALPOS
DDLANGUAGE.
PERFORM display_data.
perforM ALV .
FORM display_data.
fieldcatalog-fieldname = 'DOMNAME'.
fieldcatalog-seltext_m = 'Domain name'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 30.
fieldcatalog-key = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'VALPOS'.
fieldcatalog-seltext_m = 'Domain value key'.
fieldcatalog-col_pos = 1.
fieldcatalog-outputlen = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'DDLANGUAGE'.
fieldcatalog-seltext_m = 'Language key'.
fieldcatalog-col_pos = 2.
fieldcatalog-outputlen = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'DOMVALUE_L'.
fieldcatalog-seltext_m = 'Values for domains: Single value/upper
limit'.
fieldcatalog-col_pos = 3.
fieldcatalog-outputlen = 10.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'DOMVALUE_H'.
fieldcatalog-seltext_m = 'Values for domains, upper limit'.
fieldcatalog-col_pos = 4.
fieldcatalog-outputlen = 10.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'DDTEXT'.
fieldcatalog-seltext_m = 'Short text for fixed values'.
fieldcatalog-col_pos = 5.
fieldcatalog-outputlen = 60.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
ENDFORM. " display_data
*& Form ALV
* text
* --> p1 text
* <-- p2 text
FORM ALV.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
* i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
* it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
* is_variant = z_template
tables
t_outtab = gt_tables
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
ENDFORM. " ALV
reward points if it is usefull ....
Girish -
How does Reference Field work?
Hi All,
I have short of problem knowing how reference field works. I have one field in ABAP query: MBEW-STPRS. The field type is CURR and it have reference field T001-WAERS.
In query I made, the currency isn't occurs although I have set it to be display. I try to look how this reference field works in any source but can't find any answer. May be some of you can give me a little explanation.
Thank you so much
Regards
HadiHi,
Reference fields work in the following way,
When you say quantity is 100, what it refers to - 100 pc, 100 bundles or 100 kg or 100 metres??? The unit of qty defines whether it is PC, KG, M etc...
In the database, SAP stores all amount values with 2 decimal places. But when SAP reads it, it interprets it based on the currency associated with the amount field.
We require reference fields to Currency/Quantity fields as they are meaningless with out having the units.
Ex: If we say, i paid 100. How can we figure out if he had paid 100 paise or 100 rupees.
So, units are must.
In case of quantity field QUAN, reference field will be always of type UNIT,
currency field CURR, reference field will be always of type CUKY.
It is mandatory to specify reference fields when we create fields of quantity/currency type in data base tables.
Hope this will clear you.
Thanks & Regards,
Pavan. -
Auto - shown field name in the issue tab - OTM
Hello,
There is one strange thing happened that suddenly one additional field name is started visible as 'Closed" and i am not able to seen the field name in the admin section as CLOSED (issue tab). can anyone tell me from it is coming and how should i remove this. currently, it is coming like this, see the CLOSED field name:
Created:
*Closed:*
Issue Type:
Version: 1
Assigned To:
Status:
Priority:
Platform:Hi,
1, Please check if this field is hiden for specific user by right click to check if there is invisible element.
If so, please just restore the changes.
2, Please check the customizing path below to see if this field is hiden:
SRM Server
Cross-Application Basic Settings
Extensions and Field Control (Personalization)
Configure Field Control
Configure Control for Fields on Item Level
Meanwhile would you please tell me your srm server version?
Regards,
Ivy
Maybe you are looking for
-
How can I install Apple BootCamp with Windows 8 32-bit then upgrade to 64-bit?
I am trying to install Apple Boot Camp on a MacBook Pro 13-inch, bought in early 2013. I have Windows 8 pro 32-bit install package and an install package for 64-bit upgrade. I received my Windows licenses for free (because I work for a nonprofit). I
-
IMac doesn't recognize HP 4635 Scanner
The Scan program that comes with the 4635 doesn't recognize the scanner. I can scan using Photoshop or Image Capture. The printer works fine.
-
Hi Gurus, I would like to create empty PO i.e. without any line Items. Using ME23N it goes into error but still PO can be put on "Hold" and I still get PO Number with just header data. Doing same via BAPI ;BAPI_PO_CREATE1' it goes into error saying "
-
Adding a dynamic menu to a template
Can somebody tell me what I'm doing wrong please? I have created a menu, I want to add it to a template (this template already has a dynamic menu which I added to it by the way, in case it's important to the answer). I have selected the Template and
-
Scale basis in condition type?
Hi I want to know the exact functionality of Scale basis in a condition type. Basically what does scale basis, scale formulae, check value ,scale type etc mean? Explanation with an example would be highly appreciated. Also we do maintain scale basis