HOW TO CONFIGURED CONDITION CHECK IN RUN TIME
MY SCREEN LIKE WITH TWO TEXT BOX WITH ANY VALUE IN INTEGER OR LONG AND I WRITE CODE FOR CHECK CONDITION LIKE >,<=<=,>= ETC. SELECTION FROM DROP DOWN OR ENTER IN ANOTHER TEXT BOX SO HOW I CAN ACHIEVE MY REQUIREMENT.
In order to compare the values of two textboxes, you will need to convert the text to numbers. Use a code like this (in C#):
long number1 = long.Parse(textBox1.Text);
long number2 = long.Parse(textBox2.Text);
(Or consider long.TryParse).
Then use a switch statement to identify and perform the required comparison.
Similar Messages
-
How to call abap proxy at run time?
hello frnds,
i m working on a scenario in which whenever Invoice is saved in SAP R/3 at that time same data should go to Oracle DB. i m using ABAP proxy on SAP R/3 side and JDBC receicver adapter on oracle side of XI.
so to post data i need to call ABAP Proxy whenever invoice is saved.. i have tried to find out save event for invoice but not able to get... can anybody tell me the solution that how i can call proxy at run time?
thanx in advance.
Regards,
Hetal.....Hi Audumbar,
Check these ...
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
/people/vanita.thareja2/blog/2006/05/23/bpm-sending-message-asynchronously-and-getting-the-response-from-synchronous-system-using-abap-proxies
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
cheers,
Prashanth
P.S Please mark helpful answers -
How to create transparent image at run-time?
How to create transparent image at run-time? I mean I want to create a (new) transparent image1, then show other (loaded) transparent image2 to image1, then show image1 to a DC. The problem is - image1 has non-transparent background...
i'm not sure, but you can set the alpha value to 0 in all pixels which are 'in' the background..
greetz
chris -
How to pass column name at run time in function.
how to pass column name at run time in function as parameter.
thank in advance
pramod patelHello,
Using dynamic sql you can pass column name to function. well I am not getting what you really want to do ? Please write in more detail. By the way I am providing one example here. see it uses dynamic sql.
Create or replace function fun_updtest (p_columnname_varchar2 in varchar2,
p_value_number in number)
return number is
v_stmt varchar2(500);
begin
v_stmt := 'update emp
set '||p_columnname_varchar2||' = '||to_char(p_value_number)||'
where empno = 7369';
execute immediate v_stmt;
return 0;
commit;
end;
call to this function can be like this..
declare
v_number number;
begin
v_number := fun_updtest('SAL',5000);
end;
Adinath Kamode -
How to choose RT System at Run Time
Variations of this question have been asked, but I'm not sure if they've been answered.
We use LabVIEW RT to do a variety of behavior tests. We have multiple experimenters using the same hardware, and each has his/her own set of "What I want to do" requirements.
Originally, we used LabVIEW 7.0 (i.e. Before Project) to develop a Host and Remote (PXI) application. The Host application was built as an .EXE, while the Remote was saved as an .LLB, copied to the PXI, and "invoked" at Run Time by calls to VI Server. Note that this means that the code on the Remote might (is?) not be as compact, efficient, or optimized as if we had built an .EXE. But we definitely can have Bob's Experiment, Jane's Experiment, and Joe's Experiment on the PC (as separate executables), and each could respectively call Bob's RT, Jane's RT, or Joe's RT on the PXI at run time. No need to have LabVIEW (or LabVIEW expertise) on this system, and Bob, Jane, and Joe can be "ordinary users".
"Modern LabVIEW" takes a slightly different (and probably better) view towards Real-Time -- both the Host and Remote programs are built as Executables (the RT is built as an .RTEXE). We can "pre-deploy" the RT code to the PXI, and set it to run at Startup. This makes getting the RT side "running" semi-automatic -- all you need to do (if it isn't running) is reboot the PXI.
But what if you want Bob, Jane, and Joe's version, selectable by running (on the Host) Bob, Jane, or Joe's Host application?
I'm playing with the following algorithm, which seems to work. I'm presenting it here to get feedback, especially if there is a "better way" to do this.
The key to this method is that there is an .INI file on the Remote, C:\ni-rt.ini, that contains, among other things, the RT Target's Startup Application path (by default, this is C:\ni-rt\startup\startup.rtexe).
Consider three Projects, Project Bob, Project Jane, and Project Joe. Within each Project, a Host executable is built having a name like "UI Bob" (or "Jane" or "Joe"), while the Target executable is given the name "RT Bob" (or "Jane" or "Joe"). The three .RTEXE files are copied to the Target and placed in the Startup folder, C:\ni-rt\startup.
Now run one of the Host executables. It does the following:
FTP a copy of C:\ni-rt.ini from the Target to itself.
Get the name of the Startup .RTEXE.
If it is the "appropriate" name (i.e. if the Host program is UI Bob.exe, the Remote should be RT Bob.rtexe), do nothing, as the Target is already running the right code.
Otherwise, we need to force the Target to run the correct Target code. We can do this by changing the Startup entry in the .INI file to the Remote code we need (for example, RT Bob.rtexe), then tell the Remote to Reboot. When it comes back, it will be running the appropriate RT code.
The Host now goes ahead and tries to connect to the Remote. If a connection cannot be established (for example, the Remote code might have stopped), a Reboot of the Remote might fix things up.
Short of trying to write a single enormous program that encompasses every experimental scenario and situation (i.e. have a big Case Statement with a Bob, Jane, or Joe "choice", and a single executable that had everyone's code in it), this seemed to be a fairly simple way to have the robustness of compiled executables on both the Host and Remote machines, yet maintain the flexibility to let the (non-LabVIEW-guru) User choose which executable to run.
I haven't fully deployed this system -- I'm currently at "Proof-of-Concept" stage, but I've got the various "pieces" working. Does this seem like a sensible appropach? Are there other, simpler, ways to accomplish this?
Bob SchorHey Bob.
So I assume you're -completely- working with built executables? You're not going to work in the editor environment to modify your projects at all?
If this is the case, then having a generic deployment phase at the beginning of the executable (with a "setting up hardware for your app" splash screen) isn't a bad idea -
Check the binary on the target, ensure it matches the binary you have on the host machine (in case you ever decide to update).
If they don't match, FTP the new file down to replace the old one.
FTP the ni-rt.ini file, ensure the startup exe is enabled and is pointing to the correct location.
If it's not enabled or not pointing to the correct startup file, modify the .INI file and FTP back to the target.
If you had to update the INI file, ask target to reboot itself. Wait 30 seconds, and wait for target to become available again.
Connect to the target. If you cannot connect, reboot target. If the target comes back and you still cannot connect to the app, notify user.
That's almost exactly how we handle installation and deployment via MAX.
The big assumption here is that the built executables were all built with the same version of LabVIEW Real-Time. If not, you'd need a system replication step in there to make sure the proper version of LabVIEW is on the target before launching the built .rtexe.
-Danny -
How to Load a Panel during run time from a CVI dll
Hi,
I want to execute/load a panel during runtime, from a CVI dll function.
my CVI dll "test.dll" has "READ_PAN" function. while executing this function from a Test Stand Action step i want Configure Panel (from FR_GUI.uir) to pop up.
can you please suggest me how can i do this from my "test" project of CVI.
int __stdcall __export RunFRConfig (CAObjHandle step,CAObjHandle thisContext)
ERRORINFO errorInfo;
char errMsg[1024];
int pan;
pan = LoadPanelEx (0, "FR_GUI.uir", READ_PAN, __CVIUserHInst);
DisplayPanel (pan);
RunUserInterface();
DiscardPanel (pan);
return 0;
Error:
// sprintf(FinalErrMsg,"Configure Error: %s",errMsg);
return -1;Thanks for ur reply.
Hello Asad,
It is possible to maximize the run time previewer when calling reports from forms. U need to set a parameter named 'MAXIMIZE' to do that.
I m attaching a code sample for u. This is working in my production environment.
DECLARE
pl_id ParamList;
BEGIN
pl_id := Get_Parameter_List('setProposal');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('setProposal');
// This parameter is set to hide parameter form at run time
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
// This parameter is used to maximize previewer window at run // time
Add_Parameter(pl_id, 'MAXIMIZE', TEXT_PARAMETER, 'YES');
Run_Product(REPORTS, 'sample.rep', SYNCHRONOUS, RUNTIME,
FILESYSTEM, pl_id, NULL);
END;
Feel free to contact me if u need anymore assistance.
Take care and bye -
How to automatically confirm check pay run (payment process request) in R12
Payment Method = check
The payment process profile (ppp) settings are as follows:
Processing Type=Printed
Payment Completion Point = When the Payment Instruction is Formatted
Default Payment Document= blank/null
Payment File=Send to File
My question is this. Is it possible or how do you configure oracle payments (PAYMENT PROCESS PROFILE [PPP] and/or PAYMENT PROCESS REQUEST [PPR])for check payments created as a file output like you have in 'EFT' instead of printing the checks and CONFIRM the PPR/payments AUTOMATICALLY after the checks/payments have been formatted.
The reason we are doing this is because we want an external agency to print the checks for my organisation.
What is happening at the moment is that the PPR runs and the payments file is created successfully. At this point, the PPR is in 'FORMATTED - READY FOR RECORDING' status. The PPR then remain in this status until it is manually confirmed by clicking the 'Take Action' icon in the 'payment instruction' tab and then clicking on 'CONFIRM'.
If the PPR is left in the above status, then the next submitted check pay run errors because the payment document(s) are still locked by the pay run that is in the 'Formatted - Ready for Recording' state.
If it is not possible to configure Oracle payments to auto confirm the check pay run of this type, is an API available that can be called to confirm check payments - once they are in the formatted status.
I've looked at the following notes in 'My Oracle Support', but they are not much use.
Note 1097547.1 is related to bug 8781032 which talks about "Automatic Initiate when Payment Process Request is Complete".
and then Note 1215392.1 relates to enhancement request.
Bug 10142423: GIVE AN OPTION IN PAYMENT PROCESS PROFILE TO SUBMIT POSITIVE PAY FILE AUTOMATIC
Thanks.Try running this SQL
SELECT
r.calling_app_id,
r.created_by,
r.payment_service_request_id,
r.creation_date,
r.call_app_pay_service_req_code,
fa.application_name,
fu.user_name,
r.payment_service_request_status
FROM
iby_pay_service_requests r,
fnd_application_vl fa,
fnd_user fu
WHERE r.payment_service_request_id = <<your concurrent request ID>>
AND r.calling_app_id = fa.application_id(+)
AND r.created_by = fu.user_id(+) -
How to dynamically validate users at run time using connection pools ?
Hi Folks
We are facing a peculiar situation . We have established connection to our
oracle 8i database using Oracle Thin driver using conenction pooling at the weblogic
server . We set up connection pools at the console to set up connections to thge
oracle 8i database. However the user name and password is always static when
we create the connection pool at the console .
How do i dynamically validate other users using the same connection pool ??
Eg - The connection pool at design time in the console uses user A and password
- passA . Now at run time lets say I prompt the user for a login screen and want
to trap the user id and apssword parameters entered by the user and use it with
the connection pool created earlier . I tried using the below code snippet :-
Properties props = new Properties();
props.put("connectionPoolID", "Oracle_Thin_Driver_Pool");
props.put("user" , userId );
props.put("password",userPass);
myDriver = (Driver) Class.forName("weblogic.jdbc.pool.Driver").newInstance();
conn = myDriver.connect("jdbc:weblogic:pool", props);
But always it connects to the database using the userid and password set in the
console while creating the connection pool . So how i get the connection pool
to validate my current userid and password entered through the login screen ??
Thanks in advance
KeithHey Bob.
So I assume you're -completely- working with built executables? You're not going to work in the editor environment to modify your projects at all?
If this is the case, then having a generic deployment phase at the beginning of the executable (with a "setting up hardware for your app" splash screen) isn't a bad idea -
Check the binary on the target, ensure it matches the binary you have on the host machine (in case you ever decide to update).
If they don't match, FTP the new file down to replace the old one.
FTP the ni-rt.ini file, ensure the startup exe is enabled and is pointing to the correct location.
If it's not enabled or not pointing to the correct startup file, modify the .INI file and FTP back to the target.
If you had to update the INI file, ask target to reboot itself. Wait 30 seconds, and wait for target to become available again.
Connect to the target. If you cannot connect, reboot target. If the target comes back and you still cannot connect to the app, notify user.
That's almost exactly how we handle installation and deployment via MAX.
The big assumption here is that the built executables were all built with the same version of LabVIEW Real-Time. If not, you'd need a system replication step in there to make sure the proper version of LabVIEW is on the target before launching the built .rtexe.
-Danny -
How to configure ATP check for "create standard order in SD (OR type)"
first, I had check my stock, I only have ten PC
, but when I enter 100 PC in a OR order, and issue ATP check, it is carries out, why? I had set availavility check into 02 in MRP3 viewAvailability check
1. Availability check is an integral part of the business process that determines if the required delivery quantity can be met on a required delivery date. For this purpose the system takes into account pre-delivery activities such as scheduling for picking or packing times and the time taken to produce or obtain the material. It also performs several background functions such as Backorder processing, rescheduling and ATP quantities.
2. Backorder processing: processing of a sales order that has not been fully confirmed or not confirmed at a certain delivery date.
3. Rescheduling: is a proposal of how u2013 confirmed quantities already assigned to a sales order can be reassigned to other sales orders that have a higher priority.
4. Available to promise (ATP): is a process of checking the available quantities of a material. The ATP quantity consists of warehouse stock + planned receipts (incoming stock) u2013 planned issues (outgoing stock). to examine stock on hand (CO09) proceed to logistics u2013 sales & distribution u2013 sales u2013 environment u2013 availability overview.
5. Replenishment lead time (RLT): is the time taken for the material to become available either internally (in house production) or externally (from a vendor). The most important things to consider during an external procurement are purchasing and MRP2 (procurement) views of MMR where the processing time for purchasing, planned delivery time and goods receipt processing time are taken into account. On the other hand internal procurement is based on in house production time (MRP 2 view) goods receipt processing time or alternatively RLT time, which is found on MRP 3 view.
6. RLT (Replenishment Lead Time) is the time taken for the material to become available. RLT is only used when doing an ATP check (Available To Promise). The value of RLT for a material is specified on material master record.
7. There are three types of availability checks u2013
Check on basis of ATP quantities.
Check against product allocation.
Check against planning.
Configuring Availability check through Checking Groups
1. The checking group + checking rule determine how the availability check is to be performed.
2. The checking group determines whether and how the system checks the stock availability and generates requirements for material planning. The checking group defines what type of requirements will be passed on i.e. summarized requirements (daily/weekly) or individual requirements for each sales order.
3. The checking rule applies to how the availability check is to be carried out at the transaction level. Note that you must define checking rules for each individual application such as for production orders for example. In Sales and Distribution, the checking rule is specified internally within the system and cannot be changed.
4. The checking rule, in conjunction with the checking group, determines the scope of the availability check for every business operation; that is, which stocks, receipts and issues are to be included in the availability check and whether the check is to be carried out with or without the replenishment lead time.
5. Briefly explaining the above u2013 checking group determines which type of requirement to be passed on to MRP whether it be individual or summarized and checking rule which is at the transaction level and can be configured independently for each application module, determines which stocks, receipts and issues to be taken into account. For performing an availability check checking group has to work in conjunction with checking rule.
6. Advantages of individual processing over summarized processing u2013
Backorder processing is possible.
You can access (MD04) order, line and schedule line individually which gives a greater control on available stock and requirements placed on stock.
The system automatically uses individual requirements in case of special stock items.
7. Required data for the Availability check to be carried out u2013
The Availability check must be switched on at the requirement class level.
The Availability check must be set at the schedule line level.
A requirements type must exist by which the requirements class can be found.
A plant must be defined in the sales order for each schedule line item (in other words plant must be defined for every material in MMR).
A checking group must be defined in the material master record in the MRP3 screen in the availability check field.
8. Configuring Availability check and defining Checking Groups u2013
Checking groups are introduced into the sales order based on the setting in the material master record.
SAP standard checking groups are 01 u2013 summarized requirements and 02 u2013 individual requirements or you can create your own by copying the standard ones.
Total sales and total deliveries columns are there to configure a checking rule to sum up requirements to post to MRP either individually or by day or week.
Block quantity required can be set if you want several users to be able to process the material simultaneously in different transactions without blocking each other.
The no check indicator is CHECKED when you DO NOT want the system to carry out ATP check.
9. Defining material block for other users u2013 the block check box is an indicator that enables you to block material master records of a particular material during the availability check and restrict other users from accessing same master record and reserve the material. If the block is not set, two users can confirm the same material at the same time for two different orders, not knowing if the stock is available or not. If you select this field, the material is blocked during the availability check and other users cannot: a) Make changes in the material master record. b) Create purchase orders for the material. C) Create orders for the material.
10. Defining default values for checking groups - Checking groups are introduced into the sales order based on the setting in the material master record.
However if there is no entry present in the material master record for the checking group, a default value can be set here, depending on material type and plant.
This default value will be used by the system depending on the material type mentioned in MMR and plant in sales order.
If an entry exists, this default value is over written by MMR.
11. Controlling Availability Check u2013 in this section, you tell the system what stock on hand and what inward and outward movements of stock it must take into account when performing the availability check in addition to whether or not to consider the replenishment lead time.
12. These settings are based on the checking group that is assigned to the material master record and the checking rule that is predefined and assigned to the sales and distribution transaction.
13. These settings carry out control both for sales order and delivery as well. This is due to the fact that you may want to include specific stock or incoming stock for the sales order, yet at the time of the delivery only include physical stock on hand waiting to be shipped.
14. It is possible to indicate to the system that you would like the availability check NOT TO CHECK the stock at the storage location level. This indicator is used to set the scope of the availability check.
15. It is used to switch off the check at storage location level. You create a reservation for a particular storage location. However, the scope of the availability check is set in such a way as to exclude the storage location. In this case, the system carries out the check at plant level only and does not take the storage location into account that is specified in the reservation.
16. Should you not want the system to automatically check RLT, you may indicate so here. RLT is the time taken for a material to become available. It is only used when doing an ATP check and is taken from MMR.
17. defining the elements in the availability check entirely depends on the business needs, but a few tips are given under u2013
When controlling the Availability check at the time of the sales order, a purchase requisition does not necessarily indicate by it is going to come into the plant.
A shipping notification on the other hand - a confirmed purchase order u2013 is a good indicator of receiving stock on a specified date.
It is always recommended not to select the shipping notifications for the delivery requirements type as you may not actually receive the stock into plant or warehouse for which you are creating a delivery. -
How to get updated value at run time in oracle forms
How to get updated value form oracle database on a field in oracle forms 6.0 at run time if the same form is opened by multiple users and both have get the same maximum value if one commit the record then how other would get that maximum value with out exiting that form...
This issue is fairly common and Forms handles the situation by displaying the error, "Record has been updated by another user. Requery to see changes." if a user tries to update a record that was updated by another user.
If your data is in a base table block, you can check before you save by checking the value in the form against the database using the Get_Item_Property('<BLOCK.ITEM>',DATABASE_VALUE). You can compare the value returned by the built-in against the value in the field to see if they have changed. This could be a lot of work and a lot of network traffic if you are checking numerous items in your data block. Forms has a standard locking mechanism that will lock the queried record as soon as a user makes any changes. If another user queries and attempts to change the record locked by another user - they will receive a "Record Locked" message.
Francois brings up a valid point. Perhaps you should review the link Francios provided as well as this one: How to ask questions the smart way
It is always a good idea to review your thread before you post it and ask yourself, "Could I answer this question given the information I've provided and the way I've asked the question?"
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
How to clear this type of run time error
good eve,
i am migrating sql server procedures to oracle procedures
i am trying to execute char(39) function in plsql is the following way correct and if this way is correct i am getting
run time error like
create or replace
procedure Sel_subgroup(key in varchar2,gradename in varchar2)
as
gid res_grades.grade_id%type;
gn res_grades.gradename_en%type;
stid sub_topics.subtopic_id%type;
stn sub_topics.subtopicname_en%type;
cc res_grades.countrycode%type;
estid exsub_topics.exsub_topics_id%type;
estn exsub_topics.exsubtopicname_en%type;
d_stmt varchar2(500);
type ref_cursor is ref cursor;
rc ref_cursor;
begin
d_stmt :='SELECT RG.Grade_ID,RG.Gradename_'||key||',ST.SubTopic_ID,ST.SubTopicname_'||key||', RG.CountryCode,
Est.ExSub_Topics_ID, Est.ExSubTopicname_'||key||' from
Res_Grades RG INNER JOIN Sub_Topics ST ON RG.Grade_Id= ST.Grade_ID
INNER JOIN ExSub_Topics Est ON ST.SubTopic_ID = Est.Sub_Topics_Id
Where Gradename_'||key||' = '''||gradename||'''';
open rc for d_stmt;
loop
fetch rc into gid,gn,stid,stn,cc,estid,estn;
if rc%found then
dbms_output.put_line(gid||gn||stid||stn||cc||estid||estn);
else
exit;
end if;
end loop;
close rc;
commit;
end Sel_subgroup;the out screen result is:
Connecting to the database rasool.
Process exited.
Disconnecting from the database rasool.can u please help me,
thanking you,
prakashto samb,
It doesn't look like you are getting a runtime error. Is it possible your query is returning no rows?
If you are sure your query should be returning rows, you probably need to check if DBMS_OUTPUT is enabled in SQL Developer (View menu I think).my query is returning a row
where where 123=key and 'FUBAR'=gradename?
If so, you want 3 single-quotes at the end of the string, not 4:
You sure? I think 4 is correct.i am sure 4 is correct i have tried as per jeenesh said
to jeenesh
SQL> ed
Wrote file afiedt.buf
1 create or replace
2 procedure Sel_subgroup(key in varchar2,gradename in varchar2)
3 as
4 d_stmt varchar2(500);
5 begin
6 d_stmt :='SELECT RG.Grade_ID,RG.Gradename_'||key||',ST.SubTopic_ID,ST.SubTopicname_'||key||', RG.CountryCode,
7 Est.ExSub_Topics_ID, Est.ExSubTopicname_'||key||' from
8 Res_Grades RG INNER JOIN Sub_Topics ST ON RG.Grade_Id= ST.Grade_ID
9 INNER JOIN ExSub_Topics Est ON ST.SubTopic_ID = Est.Sub_Topics_Id
10 Where Gradename_'||key||' = '''||gradename||'''';
11 dbms_output.put_line(d_stmt);
12* end Sel_subgroup;
SQL> /
Procedure created.
SQL> set serverout on
SQL> exec Sel_subgroup('1','TEST');
SELECT RG.Grade_ID,RG.Gradename_1,ST.SubTopic_ID,ST.SubTopicname_1,
RG.CountryCode,
Est.ExSub_Topics_ID, Est.ExSubTopicname_1 from
Res_Grades RG
INNER JOIN Sub_Topics ST ON RG.Grade_Id= ST.Grade_ID
INNER JOIN ExSub_Topics
Est ON ST.SubTopic_ID = Est.Sub_Topics_Id
Where Gradename_1 = 'TEST'
PL/SQL procedure successfully completed.i have also executed your code sir it is executing.in my coding,i found that the part of dbms_output.put_line in my ref cursor loop is not displaying me the print.
to karthick arp
Did enable serveroutput?yes i have enabled it with buffer size 200000
to
Billy Verreynne & Frank Kulash
as per you said sir i have done and got an error my code as follows
SQL> var rc refcursor
SQL> var key varchar2(2)
SQL> var gradename varchar2(30)
SQL> exec :key :='EN';
PL/SQL procedure successfully completed.
SQL> exec :gradename :='PRE-K';
PL/SQL procedure successfully completed.
SQL> begin sel_subgroup(key => :key, gradename => :gradename,rc => :rc); end;
2 /
PL/SQL procedure successfully completed.
SQL> print rc
ERROR:
ORA-24338: statement handle not executed
SP2-0625: Error printing variable "rc"how to handle this error sir -
How to Refresh System Form in Run Time
Dear All,
Please give me idea for Refresh System Document in Run Time using DI,basically I am using system columns for update for some scenarios.
So please give solution that how should refresh system form.
Thanks a lot.
Ashish Singh.Hi,
Please post above discussion in SDK forum.
Thanks & Regards,
Nagarajan -
How to determine itab type at run time
I need to write a subroutine that organizes data in internal tables for presentation by a smartform. There are a few similarly structured internal tables all with the same field name ("recipe_type") by which the data is sorted. My problem is that how I can determine the type of the itab inside my subroutine at run time? Is it ever possible in ABAP?
The subroutine code is attached below. Thanks for any help.
FORM beautify_itab TABLES itab_in TYPE table
USING v_type TYPE any
CHANGING itab_out TYPE table.
Data declaration
DATA: v_data_row LIKE LINE OF itab_in, " THIS WON'T COMPILE!
v_blank_row LIKE LINE OF itab_in. " blank row
Organize the display of the table data
LOOP AT itab_in INTO v_data_row.
IF v_type <> itab_in-recipe_type. " 'recipe_type' is the sort key for the incoming itabs
v_type = itab_in-recipe_type.
IF sy-tabix > 1.
APPEND v_blank_row TO itab_out.
ENDIF.
APPEND v_data_row TO itab_out.
ELSE.
CLEAR v_data_row-recipe_type.
APPEND v_data_row TO itab_out.
ENDIF.
ENDLOOP.
ENDFORM. "beautify_itabThe following code does what I want, but only if the input itab structure is declared first in the program. It won't work if the itab is declared as itab_in TYPE TABLE OF sflight. This is because the function 'GET_COMPONENTS_LIST' only can load the structure of a field declared explicitly in the program. Does anybody know of any method to load the structure of an itab based off a dtab?
Thanks you guys for answers. Points have been rewarded.
*& Report Z_GET_ITAB_TYPE_AT_RUN_TIME
REPORT z_get_itab_type_at_run_time.
DATA: BEGIN OF itab_in OCCURS 0,
seatsocc_b LIKE sflight-seatsocc,
fldate LIKE sflight-fldate,
END OF itab_in,
itab_out TYPE TABLE OF string,
wa_itab_out TYPE string.
SELECT seatsocc_b fldate
INTO TABLE itab_in
FROM sflight
WHERE carrid = 'AA' AND
connid = '0017'
ORDER BY seatsocc_b.
PERFORM beautify_itab
TABLES
itab_in
USING
sy-repid
'itab_in'
'SEATSOCC_B'
CHANGING
itab_out.
LOOP AT itab_out INTO wa_itab_out.
WRITE: / wa_itab_out.
ENDLOOP.
*& Form beautify_itab
text
-->ITAB_IN text
-->V_KET_FIELD text
-->ITAB_OUT text
FORM beautify_itab TABLES itab_in TYPE table
USING v_prog_name LIKE sy-repid
v_itab_in_name TYPE any
v_key_field_name TYPE rstrucinfo-compname
CHANGING itab_out TYPE table.
DATA: itab_fields TYPE TABLE OF rstrucinfo,
v_field_name LIKE rstrucinfo-compname,
v_old_key TYPE string,
v_field_value TYPE string,
v_data_line TYPE string,
v_tabix LIKE sy-tabix,
c_blank_row TYPE string VALUE ''.
FIELD-SYMBOLS: <fs_field>,
<fs_data_line>,
<fs_field_list> TYPE rstrucinfo.
gets all of the components of a structure
CALL FUNCTION 'GET_COMPONENT_LIST'
EXPORTING
program = v_prog_name
fieldname = v_itab_in_name
TABLES
components = itab_fields.
LOOP AT itab_in ASSIGNING <fs_data_line>.
v_tabix = sy-tabix.
LOOP AT itab_fields ASSIGNING <fs_field_list>.
v_field_name = <fs_field_list>-compname.
ASSIGN COMPONENT v_field_name OF STRUCTURE
<fs_data_line> TO <fs_field>.
v_field_value = <fs_field>.
IF v_key_field_name = v_field_name.
IF v_old_key <> v_field_value.
v_old_key = v_field_value.
IF v_tabix > 1.
APPEND c_blank_row TO itab_out.
ENDIF.
ELSE.
CLEAR v_field_value.
ENDIF.
ENDIF.
CONCATENATE v_data_line v_field_value INTO v_data_line
SEPARATED BY space.
ENDLOOP.
APPEND v_data_line TO itab_out.
CLEAR v_data_line.
ENDLOOP.
ENDFORM. "beautify_itab -
How to change the skin at run time
I am using jDeveloper 11.1.1.3 for ADF.
My UseCase: i want to give a dropdown for skins. User should be able to select the skin at run time and it should be loaded. Please let me know how can i achieve it.
ZeeAs per usecase, looks like you have the LOV containing the different skins.
You can ensure that the application is skinned according to the selected value in the LOV.
Ensure that you have a session scope variable that is set, whenever you change the LOV.
For more details, look into this link http://download.oracle.com/docs/cd/E14571_01/web.1111/e10140/skinning.htm
Thanks for your reply, but then...... what will be the skin loaded by default before the user selects the skin - drop down. Do i have to set something default before hand .?Define the LOV such that there are no empty elements. i.e the first element in the LOV is selected.
In the Managed bean, if the session scope is not set, return the skin family for the first element. This would be the scenario when the application loads.
Thanks,
Navaneeth -
How to bind chart type at run time
Hi,
I want to select chart type at run time using a drop down , i know the class name (CL_WD_BUSINESS_GRAPHICS) which
has to be bind. but iam unable to bind the class.
can any one help me.Hi,
**... check view exists
check me->if_salv_wd_view~r_view is bound.
*... get wd root uie for adding graphic control uie
data:
lr_wd_root type ref to cl_wd_transparent_container.
lr_wd_root ?= me->if_salv_wd_view~r_view->get_element( if_salv_wd_comp_table_ui=>c_uie_root ).
check lr_wd_root is bound.
*... use a group container
data:
lr_wd_group type ref to cl_wd_group.
lr_wd_group ?= me->if_salv_wd_view~r_view->get_element( if_salv_wd_comp_table_ui=>c_uie_graphic_container ).
*... if wd uie group container does not exist create group container
if lr_wd_group is not bound.
lr_wd_group = me->if_salv_wd_comp_table_ui~create_graphic_container( ).
endif.
*... get wd uie graphic
value ?= me->if_salv_wd_view~r_view->get_element( if_salv_wd_comp_table_ui=>c_uie_graphic ).
*... if wd uie graphic does not exist create graphic
if value is not bound.
data:
l_source_category type string,
l_source_series type string,
l_source_point type string.
concatenate if_salv_wd_comp_table_data=>c_name_node_graphic '.'
if_salv_wd_comp_table_data=>c_name_node_graphic_category
into l_source_category.
concatenate if_salv_wd_comp_table_data=>c_name_node_graphic '.'
if_salv_wd_comp_table_data=>c_name_node_graphic_series
into l_source_series.
concatenate if_salv_wd_comp_table_data=>c_name_node_graphic '.'
if_salv_wd_comp_table_data=>c_name_node_graphic_series '.'
if_salv_wd_comp_table_data=>c_name_node_graphic_point
into l_source_point.
value = cl_wd_business_graphics=>new_business_graphics(
view = me->if_salv_wd_view~r_view
id = if_salv_wd_comp_table_ui=>c_uie_graphic
bind_category_source = l_source_category
bind_series_source = l_source_series ).
data:
l_bind_value type string.
data:
lr_wd_category type ref to cl_wd_category.
concatenate l_source_category '.' 'LABEL' into l_bind_value.
lr_wd_category = cl_wd_category=>new_category(
view = me->if_salv_wd_view~r_view
bind_description = l_bind_value
bind_tooltip = l_bind_value ).
value->set_category( lr_wd_category ).
data:
lr_wd_series type ref to cl_wd_series.
concatenate l_source_series '.' 'LABEL' into l_bind_value.
lr_wd_series = cl_wd_series=>new_series(
view = me->if_salv_wd_view~r_view
bind_point_source = l_source_point
bind_label = l_bind_value
bind_tooltip = l_bind_value ).
value->add_series( lr_wd_series ).
data:
lr_wd_point type ref to cl_wd_point.
concatenate l_source_point '.' 'LABEL' into l_bind_value.
lr_wd_point = cl_wd_point=>new_point(
view = me->if_salv_wd_view~r_view
bind_value_source = l_source_point
bind_label = l_bind_value
bind_tooltip = l_bind_value ).
lr_wd_series->set_point( lr_wd_point ).
data:
lr_wd_value type ref to cl_wd_numeric_value.
concatenate l_source_point '.' 'VALUE' into l_bind_value.
lr_wd_value = cl_wd_numeric_value=>new_numeric_value(
view = me->if_salv_wd_view~r_view
bind_value = l_bind_value ).
lr_wd_point->add_value( lr_wd_value ).
me->if_salv_wd_comp_table_ui~add_child_to_container(
r_container = lr_wd_group
r_child = value ).
endif.
Maybe you are looking for
-
Photos keeps wanting to import iPhone pics that I *don't* want to import
I have photos on my phone that I just don't want or need to import into Photos on my Mac. In iPhoto, once I told it that I didn't want to import a photo, iPhoto never asked about it again. In Photos, however, each time I connect my phone, it brings u
-
I have been using this camera for years. When I plug it into the dock, then turn it on, it takes a few seconds to connect to the computer. The camera then says "Connected to Computer" and a few seconds later an external drive pops onto my machine. It
-
ESS Configuration error structure field Roundtrip_Strategy not found
we have ep7 and ecc6 our HR guyz are getting this issue when trying to create a travel request,its working in back end can any one help..?
-
Any 4 level - ezscroller users?
I am using 4level EZ scroller DW extention and continue to run into an issue when viewing in different browsers. I have placed the content layer inside a table layer and set all attributes to null so that the layer will assume the table cell attribut
-
Getting my music off my ipod.
My mac had to have the hard drive replaced. Now, I connect my ipod and it says it is sycned with another computer. I would like to sync it but I do not want to lose the music on my ipod. Is this something I could do?