How to select BAPI at runtime ?
Hi
I have a drop down list box with three options.After selecting a option a particulaer BAPI has to be called which will display some information on the screen.
So how do a select the BAPI at runtime or I have to link previously all the 3 BAPI's at design time and create 3 views and depending on the option selected a particular view will be displayed.
Please suggest
Regards
Ananda.
Hi Ananda,
Create three tables and bind them to the corresponding output nodes of the BAPI. In the 'onSelect' event handler of the dropdown, write your own logic for executing one of the three BAPIs depending on the input. At the same time, make only the required table as visible (using attributes of type WDVisibility bound to the 'visible' property of the tables).
Regards,
Shyam.
Similar Messages
-
How to select a row in Jtable at runtime
how to select a row in Jtable at runtime.
use
setRowSelectionInterval(int fromRowIndex, int toRowIndex);example if your table has 10 rows then u want to select the rows from 4 to 8 then use
setRowSelectionInterval(3, 7);if you want to select just one row for example 5 then use
setRowSelectionInterval(5, 5); -
How to formulate where clause in select query at runtime..??
I am facing a problem..
I have to generate a select query during runtime..For Ex: when user selects a row in an alv report, particular date field is to be read and another report is to be opened for that data..
I know how to make drill down report but my problem is concatenating date field...
Plz tell a solution....Hi,
Try like this....
refresh : gt_tvarvc_temp[].
gt_tvarvc_temp[] = lt_tvarvc[].
loop at gt_tvarvc_temp into gs_tvarvc_temp
where name = 'CREDIT_MEMO_DOC_TYPE'.
r_blart-sign = gs_tvarvc_temp-sign.
r_blart-option = gs_tvarvc_temp-opti.
r_blart-low = gs_tvarvc_temp-low.
append r_blart.
clear r_blart.
endloop.
concatenate 'BLART IN ' 'r_blart' into lv_condition
separated by space.
if not lv_customer_cond is initial.
if lv_condition is initial.
concatenate lv_customer_cond lv_condition
into lv_condition separated by space.
else.
concatenate lv_condition 'AND' lv_customer_cond
into lv_condition separated by space.
endif.
endif.
select bukrs belnr gjahr appending corresponding fields
of table lt_potential_credits
from bsid
where (lv_condition).
Hope its helps -
How to dynamic select based on runtime value ?
how to dynamic select based on runtime value ?
I want to write a select function, which do selecting based on parameters. eg,
CREATE OR REPLACE FUNCTION myfunction
(tableName VARCHAR2, pkName VARCHAR2, pkValue VARCHAR2, requestString VARCHAR2)
RETURN VARCHAR2 AS
BEGIN
select requestString from tableName where pkName=pkValue;
RETURN NULL;
END;
myfunction('users', 'user_id', '100', 'user_name'); it will select 'user_name' from table 'users' where 'user_id' = '100'.
This way could save lots of coding. but it can't pass compiler. how to work out ?
Thanks.While this may save code, if used frequently it will be ineffecient as all [explicative deleted]. The danger is that it would be used even for repeatable statements.
This mode of operation ensures that every statement [calling the funciton] needs to be reparsed, which is extremely expensive in Oracle (in CPU cycles, recursive SQL and shared pool memory).
Such reparsing is rarely a good thing for the environment ... it could easily lead to buying more CPU (bigger box) and therefore adding more Oracle license ... which could quickly exceed the typical developer's salary.
However - if you really, really want to do this, look up 'execute immendiate' in the PL/SQL manuals. -
How to select values frm table giving the condition value at runtime in SQL
Hi All,
How to select values from a table by giving the condition value at runtime in SQL
My SQL statement is select * from employee where empno=<empno>, this empno I want to provide at run time. Also I don't have any bind variables defined. Can anyone please tell how can I achieve this. Also do I have to write a SQL or pl/sql statement.Hi Roshni Shankar,
You can use substitution variable in case of SQL.
SQL> select * from employees where emplployee_id = &emp_id;
Enter value for emp_id: 100
old 1: select * from employees where emplployee_id = &emp_id
new 1: select * from employees where emplployee_id = 100If you want to put condition on varchar values then eighter provide values in single quotes or use single quote for substitution variable.
SQL> select * from employees where last_name = &emp_name;
Enter value for emp_name: 'King'
old 1: select * from employees where last_name = &emp_name
new 1: select * from employees where last_name = 'King'
no rows selected
SQL> select * from employees where last_name = '&e_name';
Enter value for e_name: King
old 1: select * from employees where last_name = '&e_name'
new 1: select * from employees where last_name = 'King'In case of pl/sql you can pass values to procedure and you can use those values at run time.
create or replace procedure test (p_emp_id number)
as
v_last_name varchar2(100);
begin
select last_name
into v_last_name
from employees
where employee_id = p_emp_id;
dbms_output.put_line(p_emp_id ||' -> '||v_last_name);
end;
show errors
SQL>exec test(100);
SQL>exec test(101);Edited by: Gaurav Bhide on Oct 29, 2012 4:07 AM -
How to Select a value from DropDownByIndex -Urgent
Hi All,
I have dropdownbyindex UI elements in my Views, I get values from BAPI. When click records in a table, It goes to another view to display full record. Here i have dropdownbyIndexes So it should select one of appropriate value in dropdownbyindex based on record(Value) in table.
Example:
<u><i><b>In Table View</b></i></u>
id title status priority
10000 webDynPro New Low
<i><u><b>Detail View:</b></u></i>
id 10000
title webDynPro
Status New [New,Old,Open,Closed]---DropDownbyIndex
Priority Low [High,Low,Medium]---DropDownByIndex..4m BAPI
How to select Appropriate Values from DropdownbyIndex. if any one has sample code, that will be helpful.
Note: I am using Model Nodes
Thanks and Regards
Ravi GollaHi Ravi,
In details view, you will have corresponding context node created for Status and priority dropdown fields.
Let suppose, context node for Status is, StatusNode.
value attribute inside this is,
StatusNode
|_ StatusAttrib
Now, you need to write following code to set l_status ="LOW" value in it.
wdContext.nodeStatusNode().moveFirst();
for(int i=0; i<wdContext.nodeStatusNode().size(); i++)
if(wdcontext.currentStatusNodeElement().getStatusAttrib().equals(l_status)
wdContext.nodeStatusNode().setLeadselection(i);
break;
wdContext.nodeStatusNode().moveNext();
write same code for priority also.
Let me know if it is not working with you.
regards,
Bhavik -
How to select range for dater in BAPI_DOCUMENT_GETLIST2
Hi All
I have following problem with this FM BAPI_DOCUMENT_GETLIST2. I was looking a lot on different forums but I cannot find answer which corresponds to my problem.
I have in DMS saved files for our customer and Iu2019m using object linking as
Objlinkselection-DOKOB = KNA1
Objlinkselection- OBJKY = KUNNR.
It works well, but it takes all doc from beginning. Iu2019d like to make selection that final table documentdata is in range of defined range date with values 20111201 to 20111231
Now I have to select all documents for this customer and after that I have to make loop to get correct files. And it takes a huge time and in a few years it will collaps
LOOP AT LT_DOCUMENTDATA INTO <FS> WHERE CREATEDATE IN rn_DATE.
ENDLOOP.
Any hint how to make this faster?
Just to avoid any misunderstandings, I'm not asking on loop speed but how to select by FM less rows based on create date.
Thank a lot fo any hint
PetrHello Deepak,
Thanks a lot for your answer. I have read this thread already, but it is not realy what I need. But anyway in the night I have found solution.
I will go through table DRAW where I will get just DOCNUMS for current date range.
Than I will select correct rows from table DRAD for selected KUNNR.
Final set od DOCNUMS I will use as selection criteria for BAPI.
It should help, now I go to try it.
Thansk anyway
Petr -
How to select multiple records from a TREE in the table
HI,
I have a tree structure which is in the table.When I open the node of the tree,all the subnodes are coming as one-one records in the table.I want to slect multiple record from this table.I applied onLeadSelect for this table,I can select only 1 record from the table.
Can any one plz suggest me how to select multiple records from the table so that I can get all the data of those selected record.
Regards
-SandipRashmi/Kukku,
First of all, Thanks for your help!
Is there any other way in which we can access tables other than using BAPIs or RFCs?
In my case, there is a table structure which has to be updated with values after validating a key. i don't think there is any RFC available now. do i need to create bapi/rfc for that?
Krishna Murthy -
How to display BITMAP at runtime
Hey all....
I am new to Photoshop SDK CS2 plugin programming. Can anyone help me to find out any code or any information to display bitmap image on plugin dialog using photoshop API and not the Windows API or MFC. I am just using a simple Dialog extending PIDialog Class and placed a picture control at design time using resource editor in windows (Visual Studio).
When I pass the resourceID of an Image in design time to picture control it displays the image and plugin is also working good but don't know how to pass it at runtime.
thanksHi,
Thanks for your reply. My Plugin is an Automation type plugin and is visible in File/Automate menu. I am just opening a 'File Browse Dialog Box' through 'Open File' Button on Plugin Dialog to select a image file (*.bmp) then I want to display that image in thumbnail in Picture Control box on plugin Dialog (just like the File/Automate/Picture Package... plugin already included in Photoshop cs2).
I have also downloaded the code given by you. again thanks for that. I am trying to understand the code. But I think it is too much for just displaying an image in picture control.
Thanks -
We are interested to know how/where to check query runtimes for any Query in SAP BW?
We are interested to know how/where to check query runtimes for any Query in SAP BW?
Is there any table or program to get the query run time details per query for a particular day.Hello Sravan,
Bex statics tables would be 'RSDDSTATHEADER','RSDDSTATINFO' & 'RSDDSTATEVDATA'. all these can found in one view 'RSDDSTAT_OLAP'.
above can give historical statistic.
For current Query statics : T-code RSRT, and select debug mode select display statistics and then execute.
Once you get the output press F3(one step back), there you can see statics of the query for that particular execution.
Thanks,
Mallikarjuna -
Hi
How to use bapis
BAPI_COMPANYCODE_GET_PERIOD
BAPI_CCODE_GET_FIRSTDAY_PERIOD'
BAPI_GL_ACC_GETPERIODBALANCES'BAPI_COMPANYCODE_GET_PERIOD:
To retrieve the fiscal year variant for a given date u can use the following function module
Retrieve fiscal year and period
The below code shows how to use function modules BAPI_COMPANYCODE_GET_PERIOD and
DETERMINE_PERIOD to retrieve fiscal year and fiscal period for a specific date.
*: Report: ZFISCALYR :
*: Author: www.SAPdev.co.uk :
*: Date : 2004 :
*: Description: Demonstrates how to return the corresponding fiscal :
*: year and posting period for a company code and posting :
*: date or posting date and fiscal year variant. :
REPORT zfiscalyr NO STANDARD PAGE HEADING.
TABLES: ekko.
PARAMETERS: p_bukrs TYPE ekko-bukrs,
p_bedat TYPE ekko-bedat.
DATA: gd_fiscalyr TYPE bapi0002_4-fiscal_year,
gd_fiscalp TYPE bapi0002_4-fiscal_period.
DATA: gd_fiscalyr2 TYPE T009B-BDATJ,
gd_fiscalp2 TYPE bapi0002_4-fiscal_period.
DATA: gd_periv TYPE t009-periv.
*START-OF-SELECTION.
START-OF-SELECTION.
get fiscal year and period - (requires date and company code)
CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
EXPORTING
companycodeid = p_bukrs
posting_date = p_bedat
IMPORTING
fiscal_year = gd_fiscalyr
fiscal_period = gd_fiscalp.
Alternative fiscal year function module
- (requires date and fiscal year variant code from T009 table)
gets first entry in fiscal year variant table (will need to choose
correct one from table rather than just using first entry)
SELECT SINGLE periv
FROM t009
INTO gd_periv.
get fiscal year and period
CALL FUNCTION 'DETERMINE_PERIOD'
EXPORTING
date = p_bedat
PERIOD_IN = '000'
version = gd_periv
IMPORTING
period = gd_fiscalp2
year = gd_fiscalyr2
EXCEPTIONS
period_in_not_valid = 1
period_not_assigned = 2
version_undefined = 3
OTHERS = 4.************************************************************************
*END-OF-SELECTION.
END-OF-SELECTION.
WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',
/ 'Fiscal year is:', gd_fiscalyr,
/ 'Fiscal period is:', gd_fiscalp.
SKIP.
WRITE:/ 'From function module: DETERMINE_PERIOD',
/ 'Fiscal year is:', gd_fiscalyr2,
/ 'Fiscal period is:', gd_fiscalp2.
how to get the fiscal year
BAPI_CCODE_GET_FIRSTDAY_PERIOD:
CALL FUNCTION 'BAPI_CCODE_GET_FIRSTDAY_PERIOD'
EXPORTING
companycodeid = v_bukrs
fiscal_period = marv-lfmon
fiscal_year = marv-lfgja
IMPORTING
first_day_of_period = v_postdate
return = i_return1.
BAPI
function module which could calculate the previous month's start date.....
BAPI_GL_ACC_GETPERIODBALANCES:
Transactions or BAPI for GL account
Please give me reward point... -
How to select the data from a Maintainance View into an internal table
Hi All,
Can anybody tell me how to select the data from a Maintainance View into an internal table.
Thanks,
srinivas.HI,
You can not retrieve data from A mentenance view.
For detail check this link,
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
Regards,
Anirban -
how to select the download location? its automatically downloading to users folder in c drive.. i wanna change to my desktop...plz help me out...
Tools -> Options -> Save files to -> Click browse button and browse for folder where you want to save the file.
-
How to select text from a webpage
hi. i have firefox for my n900. i would like to know how to select some text from a webpage so i can copy and paste it. thanks for the help. i couldn't it anywhere.
First tap where you want the selection to start. (It might help to zoom in as far as possible first. You can do this using the volume buttons in the newly-released Firefox 1.1rc1.) Then hold the Shift key while pressing the arrow keys on the N900 keyboard to select text.
Note: We are aware that this is not a very user-friendly way to select text, and we hope to include a better design in a future version of mobile Firefox. -
How to select multiple values from a listbox
Hi,
I have a list box on my UI which is not allowing me to select multiple values
I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving error
When i drag & drop the component i am unable to drop it as a multi select list box that option is not coming.
I am working on Jdev 11.1.1.3 and I am using ADF/BC components
How to select multiple values from a listbox ?
Thanks,Hi,
I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving errorank
And what is the error ?
Frank
Maybe you are looking for
-
Autofs.service causing problems with gnome's save dialog boxes
Recently I have been having a problem saving files to disk using the gnome save dialog box when autofs is running. Basically what happens is most of the folders on the right side of the save dialog disappear (see screenshot below) and remaining few b
-
How to unlink iTunes credit card info from apple id info
I put my credit card as my mom's payment for her itunes. However this changed her Apple ID to my name and address. When I changed the Apple ID info, it changed the credit card info They should not be linked because that means the Apple ID is linked t
-
Iphone 3g no longer connecting to wifi
I have a iphone 3g which has the lastest upgrade 4.2.1. I updated the phone to this latest version in March 2011. 2 days ago my wifi has stopped working. It just says its not connected and when its trying to scan for networks nothing happens. I h
-
E-Recruitment - Requisition - Infotype Field Level Change Log
Hi Experts, We are implementing SAP E-Recruitment, and would like to know how to capture the changes made in Requisition at infotype field level. For example: If a support team member is added/delete in the Requisition (Tab - Support Team), then thes
-
Delete request in red from ODS - urgente -
Good day, I wanted to delete the last request of an ODS, and, after it tried to make rollback (dezactivate) it status changed in red. The informations of this request were deleted before with selective delete. The problem now is that i cannot modify