How to generate screen dynamically ?
My requirement is to get the customers informations but the case is according to the number of the customers to generate the tab screen automatically (ex: 5 customers should be 5 tabs )and each tab screen to layout the information of the customer.
the title of the tab should be the customer name.
any suggestion?
many thanks~
hi
good
try this code
FUNCTION z_change_screen_field_position.
Code Devlioped in version 4.5B
""Local interface:
*" IMPORTING
*" VALUE(PROG) LIKE D020S-PROG DEFAULT SY-REPID
*" VALUE(DNUM) LIKE D020S-DNUM DEFAULT SY-DYNNR
*" VALUE(FNAM) LIKE D021S-FNAM
*" VALUE(LINE_NUM)
*" VALUE(COLN_NUM)
DATA: h LIKE d020s,
f LIKE d021s OCCURS 0 WITH HEADER LINE,
e LIKE d022s OCCURS 0 WITH HEADER LINE,
m LIKE d023s OCCURS 0 WITH HEADER LINE,
f1(100), f2(100), f3(100), dynpro_id(44).
Format Screen ID
dynpro_id = prog.
dynpro_id+40(4) = dnum.
Import Screen data in tables
IMPORT DYNPRO h f e m ID dynpro_id.
CHECK sy-subrc EQ 0.
Modify Screen Data
LOOP AT f WHERE fnam EQ fnam.
f-line = line_num.
f-coln = coln_num.
MODIFY f.
ENDLOOP.
CHECK sy-subrc EQ 0.
Export Screen Data
EXPORT DYNPRO h f e m ID dynpro_id.
CHECK sy-subrc EQ 0.
Generate Screen for changes to take effect
GENERATE DYNPRO h f e m ID dynpro_id MESSAGE f1 LINE f2 WORD f3.
ENDFUNCTION.
thanks
mrutyun^
Similar Messages
-
give me some points on how to generate the dynamic Alv using RTTS and why it is useful to generate this way
Hi ,
Please follow this link
RTTS question
problem with coloring cells in dynamic fieldcatalog
Regards,
Pravin -
How to generate a dynamic selection-screen
Hi folks,
I have a itab with all fields and descriptions of a database-table. Now i want to generate a selection screen dynamically. I want to create a select-option for every field of the table.
First I read all fields of a database table into my intern table:
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'database_tabname'
TABLES
dfies_tab = it_tabname_fields.
Then I tried to generate a dynamic selection-screen with a select-options statement per field of the itab, but it doesn't work:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 NO INTERVALS.
LOOP AT it_tabname_fields INTO s_tabname_fields. "should be 14 loops and 14 lines
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (25) s_tabname_fields-SCRTEXT_S FOR FIELD var1. "the name of the field should be set dynamically from the itab
SELECT-OPTIONS var1 FOR tabname-s_tabname_fields-fieldname. "s_tabname_fields-fieldname should be set dynamically for each line
SELECTION-SCREEN END OF LINE.
ENDLOOP.
SELECTION-SCREEN END OF BLOCK b2.
I know that this doesn't work but it should help you to understand what i want to do. It doesn't create more than one select-option (it should be 14 because there are 14 lines in the table) and it doesn't get the values from the table.
I hope you can help me...
Regards,
Sebastianhi
Firstly, have a look at the following code to see how this can be implemented -
REPORT ZTEST.
perform test.
class test definition.
public section.
methods: create_screen.
endclass.
class test implementation.
method create_screen.
data: report_line(72),
report_source like table of report_line.
data: err_message(240),
err_line type i,
err_word(100).
report_line = 'REPORT TEST.'.
append report_line to report_source.
report_line = 'PARAMETERS: P_TEST TYPE I.'.
append report_line to report_source.
report_line = 'START-OF-SELECTION.'.
append report_line to report_source.
report_line = 'WRITE : P_TEST.'.
append report_line to report_source.
syntax-check for report_source message err_message
line err_line
word err_word.
if err_message is initial.
INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
endif.
endmethod.
endclass.
form test.
data test type ref to test.
CREATE OBJECT TEST.
call method test->create_screen.
endform.
As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
Regards,
ravish
<b>plz dont forget to reward points if helpful</b> -
How to generate a dynamic update query to update error flag in a mapping?
i have a mapping in which i m loading log table through generated parameter file.But i want to update the error flag using dynamic update query.for that i have to generate a query and use update sqloverridw in target instances.but i m not getting how to implement it.Please help..!!
Hi All, I have a scenario. Below is the source record. field1|field2|field3|field4|field5|field6|field7
5|20150329|1|980100001|500|My name is Lalita|25
5|20150329|1|303444442|200|My name is |Lalita.I work in TCS|26
5|20150329|1|442101001|1000|My name is Lalita.I worked Syntel|56
5|20150329|1|446788900|300|My name|67 My source file is | separator. But for field6 the data might come with '|'.
So I want to import the data along with '|' after separating all field in Informatica Layer. Source team is not going to preformat the file. Please suggest how to achive this. -
How to generate a dynamic column with unique value in AMDP
Hi Collegue,
For AMDP I have a table with material plant,i have to assign a unique number to each unique combination of material,plants into a dynamic column say sequence.
Please suggest me how to proceed.
Regards,
Saurabhhi
Firstly, have a look at the following code to see how this can be implemented -
REPORT ZTEST.
perform test.
class test definition.
public section.
methods: create_screen.
endclass.
class test implementation.
method create_screen.
data: report_line(72),
report_source like table of report_line.
data: err_message(240),
err_line type i,
err_word(100).
report_line = 'REPORT TEST.'.
append report_line to report_source.
report_line = 'PARAMETERS: P_TEST TYPE I.'.
append report_line to report_source.
report_line = 'START-OF-SELECTION.'.
append report_line to report_source.
report_line = 'WRITE : P_TEST.'.
append report_line to report_source.
syntax-check for report_source message err_message
line err_line
word err_word.
if err_message is initial.
INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
endif.
endmethod.
endclass.
form test.
data test type ref to test.
CREATE OBJECT TEST.
call method test->create_screen.
endform.
As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
Regards,
ravish
<b>plz dont forget to reward points if helpful</b> -
How to generate reportdesign dynamically using java with out xml file
hi
how can i generate a reportdesign dynamically using java with out passing xml file to jasperDesign , i want to create my reportdesign with out xml file
how can i ,please help
thanksLiveCycle does provide a Java API to forms; LiveCycle is in fact a suite of programs, mostly enterprise level for running on server (next to which the cost of the master suite is a drop in the ocean). LiveCycle Designer is perhaps the only end user tool, and it is not for server use and doesn't have an API.
Are you looking for a server solution? If so, nothing in the master suite can help, it isn't for server use. -
How to generate controls dynamically based on value stored in database using mvc4?
In my database, i have a field called control_ids corresponding to text box, dropdownlist, radiobuttonlist etc. My goal is to
create controls dynamically based on value of control_id-field in table. Anybody please help me how to create the controls dynamically in MVC 4 for this scenario.In your view you could do something like that:
foreach (var field in Model.FormStruture.fields)
<div class="editor-label">
<label for="@field.Name">@field.Descricao</label>
</div>
<div class="editor-field">
<input class="text-box single-line" id="@field.Name" name="@field.Name" type="text" value="@field.Valor" data-rules-required="@field.Mandatory.ToString().ToLower()" data-rule-number="@field.Tipo.Equals(SiB.OCR.Documentos.Modelo.TipofieldDocumento.Numerico).ToString().ToLower()" title="@field.Descricao" />
</div>
if (!String.IsNullOrEmpty(field.Format))
@:<script type="text/javascript">$("[email protected]").mask("@field.Format");</script> -
How to generate fields dynamically
I have the following in application.java.
public void addWaterCraft(WaterCraft newCraft) { waterCraftList.add(newCraft); }
if the user clicks " add watercraft endorsement" , it takes him to another screen where it has various fields like
1. watercraft make
2. watercraft length
3.watercraft type
under watercraft heading.
What i want is the user should be able to enter unlimited watercraft endorsements. That means if the user clicks " add watercraft endorsement" second time, automatically, second row of fields should be generated.What code should i add to
public void addWaterCraft(WaterCraft newCraft) { waterCraftList.add(newCraft); } to generate unlimited number of watercrafts?
thanksAdd them to a List, Set, or Map.
http://java.sun.com/docs/books/tutorial/collections/ -
How to generate a PDF 417 Barcode by assigning a dynamic value at runtime?
PDF 417 Barcode Description given in the Livecycle Designer 8.2
: PDF 417 Non-Scriptable Barcode. Value must be assigned to this barcode at design time, and this barcode will not update after form object value changes.
And my question is how to generate a PDF 417 Barcode by assigning a dynamic value at runtime?All the information you described points to the problem that reports seems can't generate to a file which already exist. You can verify that by simply doing
r30run32 C:\AC_REPORT.REP DESTYPE = FILE DESFORMAT = PDF BATCH = YES' desname=c:\temp\ac_report.pdf
several times. If first time the report is successfully generated in c:\temp\ac_report.pdf, but not the second, third time, then it looks like there is a bug on reports r30run32 executable.
You may try to find any latest patch for Reports 3.0 to see if patch can solve you problem. But keep in mind Reports 3.0 is de-supported, you are better to move to 6i or 9i reports.
Thanks,
-Shaun -
How to generate report with dynamic variable number of columns?
How to generate report with dynamic variable number of columns?
I need to generate a report with varying column names (state names) as follows:
SELECT AK, AL, AR,... FROM States ;
I get these column names from the result of another query.
In order to clarify my question, Please consider following table:
CREATE TABLE TIME_PERIODS (
PERIOD VARCHAR2 (50) PRIMARY KEY
CREATE TABLE STATE_INCOME (
NAME VARCHAR2 (2),
PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD) ,
INCOME NUMBER (12, 2)
I like to generate a report as follows:
AK CA DE FL ...
PERIOD1 1222.23 2423.20 232.33 345.21
PERIOD2
PERIOD3
Total 433242.23 56744.34 8872.21 2324.23 ...
The TIME_PERIODS.Period and State.Name could change dynamically.
So I can't specify the state name in Select query like
SELECT AK, AL, AR,... FROM
What is the best way to generate this report?SQL> -- test tables and test data:
SQL> CREATE TABLE states
2 (state VARCHAR2 (2))
3 /
Table created.
SQL> INSERT INTO states
2 VALUES ('AK')
3 /
1 row created.
SQL> INSERT INTO states
2 VALUES ('AL')
3 /
1 row created.
SQL> INSERT INTO states
2 VALUES ('AR')
3 /
1 row created.
SQL> INSERT INTO states
2 VALUES ('CA')
3 /
1 row created.
SQL> INSERT INTO states
2 VALUES ('DE')
3 /
1 row created.
SQL> INSERT INTO states
2 VALUES ('FL')
3 /
1 row created.
SQL> CREATE TABLE TIME_PERIODS
2 (PERIOD VARCHAR2 (50) PRIMARY KEY)
3 /
Table created.
SQL> INSERT INTO time_periods
2 VALUES ('PERIOD1')
3 /
1 row created.
SQL> INSERT INTO time_periods
2 VALUES ('PERIOD2')
3 /
1 row created.
SQL> INSERT INTO time_periods
2 VALUES ('PERIOD3')
3 /
1 row created.
SQL> INSERT INTO time_periods
2 VALUES ('PERIOD4')
3 /
1 row created.
SQL> CREATE TABLE STATE_INCOME
2 (NAME VARCHAR2 (2),
3 PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD),
4 INCOME NUMBER (12, 2))
5 /
Table created.
SQL> INSERT INTO state_income
2 VALUES ('AK', 'PERIOD1', 1222.23)
3 /
1 row created.
SQL> INSERT INTO state_income
2 VALUES ('CA', 'PERIOD1', 2423.20)
3 /
1 row created.
SQL> INSERT INTO state_income
2 VALUES ('DE', 'PERIOD1', 232.33)
3 /
1 row created.
SQL> INSERT INTO state_income
2 VALUES ('FL', 'PERIOD1', 345.21)
3 /
1 row created.
SQL> -- the basic query:
SQL> SELECT SUBSTR (time_periods.period, 1, 10) period,
2 SUM (DECODE (name, 'AK', income)) "AK",
3 SUM (DECODE (name, 'CA', income)) "CA",
4 SUM (DECODE (name, 'DE', income)) "DE",
5 SUM (DECODE (name, 'FL', income)) "FL"
6 FROM state_income, time_periods
7 WHERE time_periods.period = state_income.period (+)
8 AND time_periods.period IN ('PERIOD1','PERIOD2','PERIOD3')
9 GROUP BY ROLLUP (time_periods.period)
10 /
PERIOD AK CA DE FL
PERIOD1 1222.23 2423.2 232.33 345.21
PERIOD2
PERIOD3
1222.23 2423.2 232.33 345.21
SQL> -- package that dynamically executes the query
SQL> -- given variable numbers and values
SQL> -- of states and periods:
SQL> CREATE OR REPLACE PACKAGE package_name
2 AS
3 TYPE cursor_type IS REF CURSOR;
4 PROCEDURE procedure_name
5 (p_periods IN VARCHAR2,
6 p_states IN VARCHAR2,
7 cursor_name IN OUT cursor_type);
8 END package_name;
9 /
Package created.
SQL> CREATE OR REPLACE PACKAGE BODY package_name
2 AS
3 PROCEDURE procedure_name
4 (p_periods IN VARCHAR2,
5 p_states IN VARCHAR2,
6 cursor_name IN OUT cursor_type)
7 IS
8 v_periods VARCHAR2 (1000);
9 v_sql VARCHAR2 (4000);
10 v_states VARCHAR2 (1000) := p_states;
11 BEGIN
12 v_periods := REPLACE (p_periods, ',', ''',''');
13 v_sql := 'SELECT SUBSTR(time_periods.period,1,10) period';
14 WHILE LENGTH (v_states) > 1
15 LOOP
16 v_sql := v_sql
17 || ',SUM(DECODE(name,'''
18 || SUBSTR (v_states,1,2) || ''',income)) "' || SUBSTR (v_states,1,2)
19 || '"';
20 v_states := LTRIM (SUBSTR (v_states, 3), ',');
21 END LOOP;
22 v_sql := v_sql
23 || 'FROM state_income, time_periods
24 WHERE time_periods.period = state_income.period (+)
25 AND time_periods.period IN (''' || v_periods || ''')
26 GROUP BY ROLLUP (time_periods.period)';
27 OPEN cursor_name FOR v_sql;
28 END procedure_name;
29 END package_name;
30 /
Package body created.
SQL> -- sample executions from SQL:
SQL> VARIABLE g_ref REFCURSOR
SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2,PERIOD3','AK,CA,DE,FL', :g_ref)
PL/SQL procedure successfully completed.
SQL> PRINT g_ref
PERIOD AK CA DE FL
PERIOD1 1222.23 2423.2 232.33 345.21
PERIOD2
PERIOD3
1222.23 2423.2 232.33 345.21
SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2','AK,AL,AR', :g_ref)
PL/SQL procedure successfully completed.
SQL> PRINT g_ref
PERIOD AK AL AR
PERIOD1 1222.23
PERIOD2
1222.23
SQL> -- sample execution from PL/SQL block
SQL> -- using parameters derived from processing
SQL> -- cursors containing results of other queries:
SQL> DECLARE
2 CURSOR c_period
3 IS
4 SELECT period
5 FROM time_periods;
6 v_periods VARCHAR2 (1000);
7 v_delimiter VARCHAR2 (1) := NULL;
8 CURSOR c_states
9 IS
10 SELECT state
11 FROM states;
12 v_states VARCHAR2 (1000);
13 BEGIN
14 FOR r_period IN c_period
15 LOOP
16 v_periods := v_periods || v_delimiter || r_period.period;
17 v_delimiter := ',';
18 END LOOP;
19 v_delimiter := NULL;
20 FOR r_states IN c_states
21 LOOP
22 v_states := v_states || v_delimiter || r_states.state;
23 v_delimiter := ',';
24 END LOOP;
25 package_name.procedure_name (v_periods, v_states, :g_ref);
26 END;
27 /
PL/SQL procedure successfully completed.
SQL> PRINT g_ref
PERIOD AK AL AR CA DE FL
PERIOD1 1222.23 2423.2 232.33 345.21
PERIOD2
PERIOD3
PERIOD4
1222.23 2423.2 232.33 345.21 -
How to display servlet dynamically generated image ?
Hi,
How to display servlet dynamically generated image ?
I have a servlet generating a buffered image in the doGet. I want to display the image in a jsp page with other information. I'm not able to get it properly displayed.
**Try n# 1 **************************************************************
This displays my image but nothing elle :
ServletOutputStream sos = pResponse.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
encoder.encode(img);
**Try n# 2 ****************************************************************
I tried also :
In the servlet :
request.setAttribute("renderedImage", img);
and in the jsp page :
BufferedImage image = (BufferedImage) request.getAttribute("renderedImage");
<img src="<%=ImageIO.write(image,"jpeg",response.getOutputStream())%>" width="300" height="280"/>
This last try draws big crap in the jsp page, thank you in advance.
NelsonCall another servlet from the IMG tag. Have the servlet stream out the image using ImageIO (instead of writing HTML).
-
How to generate dynamic param file
Hi, Can anyone please tell me how to generate dynamic parameter file from a table. Table has following structure: create table parameter_temp{Folder_name ,Workflow_name,session_name,parameter_name,parameter value} This table stores all the parameters for all the workflows. How can I generate parameter file for specific session or workflow. Thanks,
Hi All, I have a scenario to implement.Need urgent help. I have relational source which has below fields. ID,Account,AccountType,Balance1,1001,GL,46567.901,1002,SL,56889.971,1003,Equity,45543.9081,1004,GL,89.541,1005,SL,-56889.971,1006,Equity,-45543.9081,1007,SL,-42777.45 Here my first requiremnt is to check if the balance value for entire file is 0 and if balance amount for each AccoutType is 0 , if both condtionn satifies the flow will go , else load will fail. I tried in below approach. SQ >> Expression >> Aggregator In aggregaor i have first calculated sum(balance) for entire file by group by on ID column in an aggregator , and keep actual data in expression transformation. Then i took an expression to connect actual data with the sum(balance) , since i need to perform further calculation.I tried connecting expression and aggregator , but it is not allowing me to connect the posrts. And if i am using a joiner , then wrong data is loading to target. It is joining each result of aggregator with actual ports in expression. I am not sure how to handle this scenario, so that we can just calculate sum of entire file and sum on basis of account type , is both sum are 0 then load the target , else fail.
-
How do you generate a dynamic prompt in BO
Hi,
can anyone answer this question?
How do you generate a dynamic prompt?Hi,
Dynamic prompt means user can enter value at run time (Report Refresh Time).
You can create dynamic prompt by drag one object in the webi query filter part and select as a prompt.
or on the universe level define the pre-defined condition and use that in the webi report.
Thanks,
Amit -
How to use iframe to generate a dynamic URL for error message
Hi guys,
I am new to web dynpro java and having my first webdynpro project. Just wondering how to acquire the host name, port number and error message info. dynamically in order to form the following URL format. The iframe is directed to this following URL address.
http://<%host name%>:<%port number%>/portal/ErrorPage.all?MSGID=<%=SYMSGID%>&NO=<%=SYMSGNO%>&PROG=<%=SYREPID%>
I need to replace the <%...%> part with the dynamic content. Any one could provide me with some ideas? What java classes I should use? Thanks very much.hi
Not sure why to you need hostname and port.
You can assign relative path to the Iframe. (e.g. /test/error.html )
You can use context to generate the dynamic path and assign it to IFrame.
-Ashutosh -
How to create the selection screen dynamically
Hi,
I have a requirement to create the selection screen Dynamically. All the fields that should appear on the selection screen will be available in a custom table. So, based on the entries available in the Z tables, the selection screen should be built. Eg. If there are 10 records available in the Z table, the selection screen should consist of 10 fields. If there are 100 entries, the Selection screen should contain 100 fields. and the logic to build this selection screen should be carried out dynamically in the program.
Could anyone of you please share the valuable inputs on this. If anyone has the sample code to do this, please share.
Thanks in advance.
Regards,
Paddu.Hi,
Kindly go through this sample program below:
DEMO_LIST_FORMAT_INPUT *and
check this function module:
FREE_SELECTIONS_DIALOG *.
Hope it helps
Regards
Mansi
Maybe you are looking for
-
Creating a new folder on external drive
I am struggling trying to figure out how create new event folders in imovie 11 on my external drive where all my events are stored. No matter what I click the new folder icon is greyed out. Am I doing something wrong?
-
hello Is it a rule that the subquery should always be followed with a select statement. I am using it as follows WITH subquery_this AS SELECT col_name1, col_name2, col_name3, ROW_NUMBER() OVER ( PARTITION BY col_name3 ORDER BY col_name2 DESC ) AS S F
-
Hello Gurus, I need a help. The below code is used in a BI-FIGL custom user exit. BSIS read statement. ABAP Code: Get Cost Center Accounting from BSIS table SELECT bukrs "Company Code gjahr "Fiscal Year monat "Fisca
-
Can't download premiere elements 12
Hello i bought elemnts 12 last year. I brought a new computer now and i cant find the download file for premiere 12. And i don't have money to buy elements13
-
Can you reverse/remove the ios 7 update so ipad reverts to the original 'look' and operating characteristics?