Help on loop
hi.
im new in pl/sql. would anyone know how to do a loop in sql plus? im in the process of revoking some 1k+ select rights on a specific user for multiple tables but i dont want to do it manually one by one.
here is my revoke sql statement:
revoke select on SCHEMA.TABLENAME from USERNAME;
thanks in advance
Edited by: oracleelcaro on 29-sep-2010 14:12
>
begin
2 loop
3 revoke select on SCHEMA.TABLENAME1 from USER
4 revoke select on SCHEMA.TABLENAME2 from USER
5 end loop;
6 end;
>
I will give you a very simple example how to grant select on an object owned by my schema to another schema.
SQL> show user
USER is "SCOTT"
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> set serveroutput on
SQL> l
1 begin
2 For i in (select table_name from user_tables)
3 Loop
4 dbms_output.put_line('grant select on ' || i.table_name || ' to test_user; ');
5 End Loop;
6* End;
SQL> /
grant select on DEPT to test_user;
grant select on EMP to test_user;
grant select on BONUS to test_user;
grant select on SALGRADE to test_user;
PL/SQL procedure successfully completed.I will try to do something like this and once I am happy with the statements been generated i will replace dbms_output.put_line with execute immediate.
Until then atleast I won't use execute immediate directly on a DDL statement.
Regards
Raj
P.S : Please post like I did rather than saying it's not working which carries no value.
Similar Messages
-
Hi All,
This is Rajani. I need help on LOOP AT SCREEN statement.
I have 3 selection blocks in the selection screen.
First block contains two radio buttions, the second block contains 6 parameters and the third block contains 3 parameters.
If the first radiobutton is selected, then the parameters in the third block should be grayed out.
In the similar way for the second radiobutton.
Please let me know my mistake from the following code :
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_SALES TYPE C RADIOBUTTON GROUP G1 MODIF ID R1,
P_OPS TYPE C RADIOBUTTON GROUP G1 MODIF ID R1,
P_MONTH TYPE SPMON OBLIGATORY MODIF ID R1.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS : P_SADIS TYPE BZIRK MODIF ID M1,
P_CUGRP TYPE KDGRP MODIF ID M1,
P_SADCH TYPE VTWEG MODIF ID M1,
P_SADIV TYPE SPART MODIF ID M1,
P_CUPAR TYPE HIEZU04 MODIF ID M1,
P_MAGRP TYPE MVGR1 MODIF ID M1,
P_PRHIE TYPE PRODH1 MODIF ID M1.
SELECT-OPTIONS: S_MATNR FOR S889-MATNR.
PARAMETERS : P_PLANT TYPE WERKS_EXT.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
PARAMETERS : P_WERKS TYPE WERKS_EXT MODIF ID M2,
P_MATGR TYPE PMNUX MODIF ID M2,
P_MRPCN TYPE DISPO MODIF ID M2.
SELECTION-SCREEN END OF BLOCK B3.
*INITIALIZATION.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'M1'.
IF P_OPS = 'X'.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'M2'.
IF P_SALES = 'X'.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Hi,
This is your expected solution.
TABLES: mara.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_sales TYPE c RADIOBUTTON GROUP g1 USER-COMMAND ucom DEFAULT 'X', "MODIF ID r1
p_ops TYPE c RADIOBUTTON GROUP g1 . "MODIF ID r1
PARAMETERS: p_month TYPE spmon OBLIGATORY ." MODIF ID r1
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : p_sadis TYPE bzirk MODIF ID m1,
p_cugrp TYPE kdgrp MODIF ID m1,
p_sadch TYPE vtweg MODIF ID m1,
p_sadiv TYPE spart MODIF ID m1,
p_cupar TYPE hiezu04 MODIF ID m1,
p_magrp TYPE mvgr1 MODIF ID m1,
p_prhie TYPE prodh1 MODIF ID m1.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
PARAMETERS : p_plant TYPE werks_ext.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS : p_werks TYPE werks_ext MODIF ID m2,
p_matgr TYPE pmnux MODIF ID m2,
p_mrpcn TYPE dispo MODIF ID m2.
SELECTION-SCREEN END OF BLOCK b3.
AT SELECTION-SCREEN.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_sales = 'X'.
IF screen-group1 = 'M2'.
screen-input = '0'.
ENDIF.
ENDIF.
IF p_ops IS NOT INITIAL.
IF screen-group1 = 'M1'.
screen-input = '0'.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Close this thread if you got soloution.
Regards,
Peranandam -
Help with looping and counting
i am in a CS 1 class and need help with this loop
/*Write a program that will allow the user to enter a character
until the capital letter Z is entered
The program should count the number of letters entered
and print the total after the loop is completed*/
here is what i have it doesn't end nor does it count and i don't know hwo to make it count also i suck at do..while loops hehe
char b,Z=0;
Scanner a = new Scanner(System.in);
do
System.out.print("Enter a letter: "+"\n");
b=a.next().charAt(0);
while (b !=Z);
i know that its not even close to being right just help me out here
Edited by: purplesmurf on Nov 14, 2008 7:25 PMThe following program will count the number of chacters entered until Z is enetered.
import java.io.*;
class count
public static void main(String[] args)throws IOException
char ch;
int cnt=0;
DataInputStream br=new DataInputStream(System.in);
do
System.out.print("Enter a character:");
ch=(char)br.read();
if(ch!='Z')
cnt++;
else
break;
}while((ch=(char)br.read())!='Z');
System.out.println("The Number of entered characters are:"+cnt);
} -
I have the following servlet which connects to a database and should brgin back the name of all films that an actor has stared in below is part of the servlet my problem is each time i run the servlet it just prints out "sorry there has been an error" a number of times. Can any body help me get this working?
public static int MAX_COUNT = 100;
int curr_item = 0;
private static CatalogItem addedItem[] = new CatalogItem[MAX_COUNT];
private static CatalogItem items[] = new CatalogItem[MAX_COUNT];
CatalogItem item;
CatalogItem details;
public static CatalogItem getItem(int recordingid) {
CatalogItem item;
for(int i=0; i<items.length; i++) {
item = items;
addedItem[i] = items[i];
if (recordingid==item.getrecordingid()) {
return(item);
return(null);
// Database connection
int recordingidDB;
String directorDB;
String titleDB;
String categoryDB;
String imageDB;
int durationDB;
String ratingDB;
String yearDB;
float priceDB;
int StockDB;
Connection conn = null;
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch(Exception e) {
System.out.println(e);
try{
conn = DriverManager.getConnection
("jdbc:myurl");
// System.out.println("Connection to database successful.");
catch(SQLException se) {
System.out.println(se);
try{
String category = request.getParameter("category");
String selectSQL = "select recording_id, director, title, category, image_name, duration, rating, year_released, price, stock_count "+
"from video_recordings " +
"where recording_id IN "+
"(select recording_id "+
"from video_actors "+
"where name ='"+request.getParameter("category")+"')";
System.out.println(selectSQL);
Statement stmt = conn.createStatement();
ResultSet rs1 = stmt.executeQuery(selectSQL);
while(rs1.next() && curr_item < MAX_COUNT){
recordingidDB = rs1.getInt("recording_id");
directorDB = rs1.getString("director");
titleDB = rs1.getString("title");
categoryDB = rs1.getString("category");
imageDB = rs1.getString("image_name");
durationDB = rs1.getInt("duration");
ratingDB = rs1.getString("rating");
yearDB = rs1.getString("year_released");
priceDB = rs1.getFloat("price");
StockDB = rs1.getInt("stock_count");
item =
new CatalogItem
(recordingidDB, directorDB, titleDB, categoryDB, imageDB, durationDB, ratingDB, yearDB, priceDB, StockDB);
addedItem[curr_item] = item;
items[curr_item++] = item;
int ITEM_COUNT = curr_item;
String pagetitle = "Catalog Items";
out.println(
"<BODY BGCOLOR=\"#a00e0e\">\n" +
"<center></center>\n" +
"<H1 ALIGN=\"CENTER\">" + pagetitle + "</H1>\n");
// loop to go over each item in the array of catalogItem
for(int i=0; i<addedItem.length; i++) {
details = items[i];
if (details == null) {
out.println("SORRY THERE HAS BEEN AN ERROR ");
} else {
for(int j=0; j<MAX_COUNT; j++) {
out.println(
addedItem[j].gettitle() + "\n" +
addedItem[j].getprice() + "\n" +
addedItem[j].getstock() + "\n" );
out.println("</BODY></HTML>");
stmt.close();
conn.close();
} catch(SQLException se) {
System.out.println(se);ok..
1. To print the size of the resultset there is no direct way from wat i know so far. You need to work around it. This wat i normally do for testing:
String selectSQL = "select count(video_recordings.recording_id) " +
"from video_recordings " +
"where recording_id IN "+
"(select recording_id "+
"from video_actors "+
"where name ='"+request.getParameter("category")+"')";
Statement stmt = con.createStatement() ;
ResultSet rs = stmt.executeQuery(selectSQL) ;
rs.next() ;
BigDecimal rowCount = rs.getBigDecimal(1) ;
System.out.println("Result size = " + rowCount.toString());The rowCount variable now contains the size of your query result.
2. To print the stacktrace, just add in se.printStackTrace into your catch blocks.
Additional: Can u also print something inside youe while loop to confirm that your code did enter the while loop and perform the assignment?
Maybe u can also print the addedItem[curr_item] value after you addedItem[curr_item] = item to confirm that the item was successfully assigned to addedItem[curr_item].. -
I am trying to automate converting Pages documents to Word. Maybe later to reopen them in Pages but with the options set to create flat files.
I select the files I want and they open ok. The export goes ok and I click the file close button,
Maybe this close does not work as I get twice as many files open after each loop.
How do I stop the loop function bringing all the files in again each time.?
Get Selected Items
Open Finder Items
Watch Me Do:
Click "Pages" in the Dock
Click the "File" menu
Export
Click the "Next..." button
Click the "<fill the title>" button
Loop (use the current results as input)
Your help would be welcome!
Message was edited by: putnikThanks again,
The "Dispense Items Incrementally" seems to work well enough. However, now the workflow stops at the end of the second loop. The file is closed but the "Watch Me" function seems to want something else to happen (it continues active). The only first file is still listed in the loop function.
Get Selected Items
Dispense Items Incrementally
Open Finder Items
Watch Me Do:
Click "Pages" in the Dock
Click the "File" menu
"Export"
Type '
Type '
<Cmd W>
Loop (up to 10 times, use the current results as input)
Note that I am learning to avoid mouse gestures where possible as things move about to much...
Any idea what I need to do? -
Hallow in my table itab I have employee (sobid employee number and names ex. 80 emp) in my loop(b_itab) I get all he employee that doing the course (their sobid just 3 emp) how can I use b_itab to write to other table (d_itab) to write all the employee that dont doing the course .I need a general solution.
<b>Ex.i have a table with 80 emp and I doing a loop on this table and find 3 employee that doing course how can I do comparison in the 2 table that if the employee not in b_itab(emp doing course) write them in d_itab(oteer table).</b> .if u need more details please let me now.
regardsLoop at itab.
Specify the condition here if they are doing the course
if (Condition here)
append itab to b_itab.
else
append itb to d_tab.
endif.
endloop.
The other option will be:
loop at itab.
read table b_itab with key course = itab-course.
if sy-subrc NE 0.
append itab to d_itab.
endif.
endloop.
Can you try these options? If not, please give the structure of the internal table to know exactly you want to do.
Best Regards,
Vibha
*Please mark all the helpful answers -
Hi Experts,
I am not getting output properly. it should write struct1 value whenever Tcode not equal to FS00 and FSp0. it should write itab_t001 value whenever Tcode equal to FS00 and FSp0.
1.Its working fine whenevr tcode not equal to FS00 and FSp0.
2.also its working fine whenever tcode equal to FS00 and FSp0. first looping (itab_t001) time its writing itab_t001 value when Tcode eq FS00 .then second time looping its writting so many values when tcode eq FS00 .
3.I think the problem may be here
"append lines of it_t001 to itab_t001."
can anyone help me to get exact result.
loop at struct1.
if struct1-tcode = 'FS00' Or struct1-tcode = 'FSP0' .
w_KTOPL = struct1-objectid(4).
select bukrs KTOPL from t001 into table it_t001
where KTOPL eq w_KTOPL.
check sy-subrc eq 0.
if struct1-TCODE eq 'FS00'.
append lines of it_t001 to itab_t001.
clear it_t001.
loop at itab_t001 where KTOPL eq w_KTOPL..
struct1-bukrs = itab_t001-w_bukrs.
append struct1.
clear struct1.
endloop.
endif.
endif.
endloop.1. it is giving so many values means what?
what is so many?
exactly what values u want?
loop at struct1.
if struct1-tcode = 'FS00' Or struct1-tcode = 'FSP0' .
w_KTOPL = struct1-objectid(4).
select bukrs KTOPL from t001 into table it_t001
where KTOPL eq w_KTOPL.
check sy-subrc eq 0.
if struct1-TCODE eq 'FS00'.
append lines of it_t001 to itab_t001.
clear it_t001.
loop at itab_t001 where KTOPL eq w_KTOPL..
struct1-bukrs = itab_t001-w_bukrs.
append struct1.
clear struct1.
endloop.
endif.
endif.
endloop
FROM THE ABOVE, i understood,
1. u r looping at stuct1 and when tcode is either FS00 OR FSP0, U ARE SELECTING DATA FROM T001 TO TABLE IT_T001.
2.IF TCODE = FS00, U R APPENDING TABLE ITAB_T001.
HERE EXACTLY WHAT IS UR PURPOSE?
IF U WANT TO MOVE THE CONTENTS TO ITAB_T001, U CAN USE
MOVE-CORRESPONDING right!!
then y r u using itab_t001??
is already some data there in itab_t001 and u want to append this data to it? then what u did is right.
3. U R LOOPING INSIDE STRUCT1 and again u r appending STRUCT1??? Y LIKE THIS?
THIS IS NOT GOOD FOR PERFORMANNCE. -
Help with loops inside a method
I am having a bunch of problems creating a loop inside my 'mean' method. What i want do is set up a loop to give me the average of the numbers of the input that i entered. Can anyone assist me in creating this loop?
My code:
import java.io.*;
import java.text.*;
import java.util.StringTokenizer;
public class Labtest6{
public static void main (String args []) throws IOException {
int MAX = 100;
int MIN = 0;
int [] list = new int [MAX];
int count = 0; // ammount of items//
double guess;
double x;
double avg;
double var;
double stdDev;
BufferedReader stdin = new BufferedReader (new InputStreamReader (System.in));
NumberFormat nf = NumberFormat.getNumberInstance ();
nf.setMaximumFractionDigits (2);
nf.setMinimumFractionDigits (2);
count = read_list (list);
avg = mean (list, count);
System.out.println (count);
System.out.println (avg);
public static int read_list (int [] list)throws IOException {
BufferedReader stdin = new BufferedReader (new InputStreamReader (System.in));
int count = 0;
String item = stdin.readLine ();
while (item != null)
list [count] = Integer.parseInt (item);
++ count;
item = stdin.readLine ();
return (count);
public static double mean (int [] list, double count) {
thanksThat's not our job. It is your homework. Once you have made an attempt at it and can't get it to work, paste your code and ask a specific question. You won't get any help if all you do is whine about how you can't do it.
P.S. When pasting code, highlight it and click the code button to retain formatting.
Message was edited by:
flounder -
Need help with Loop Statements!!!
Hi
im a student just starting to learn Java. I have an assignment but am stuck on the folowing question:
"Describe the operation of the 'for' loop Flow Control statement explaining the function of the initialisation, conditional and iteration parts.
Also describe the operation for the 'while' loop Flow Control statement expaling the function of the initialisation, conditional and iteration parts."
Could someone please help answer it?
(Ive looked in some books but cant find much on asnwering it)
Any help would be much appreciated!
Thanks"Could someone please help answer it?
(Ive looked in some books but cant find much on asnwering it)" - Yes
put this into a for loop so that it takes any number of arguments from the command line - eg
my name is Susie Woosie Floosie (and any number of additional names)
at present it will only output - eg
my name is Susie Woosie
public class forLoop{
public static void main (String []args) {
String firstName = args[0];
String secondName = args[1];
System.out.println("my name is "+firstName+" "+secondName); -
1. I am new to this forum, can someone let me know how I attach a code tag.
2. Im doing an exercise where I have to enter 20 values into an array . Each value I enter has to be different from a value previously entered value.If the value already exists in the array, the program should allow the user to put in a another value. I have been trying nested for loops but im just confused. Can someone help me on how to go about it ?1. I am new to this forum, can someone let me know
how I attach a code tag.http://forum.java.sun.com/help.jspa?sec=formatting
2. Im doing an exercise where I have to enter 20
values into an array . Each value I enter has to be
different from a value previously entered value.If
the value already exists in the array, the program
should allow the user to put in a another value. I
have been trying nested for loops but im just
confused. Can someone help me on how to go about it ?for (loop twenty times)
ask user for value
while (value is in the array) ask user for new value
insert value into array
next -
Hello everyone this is my first time posting here, i have always find java easy(up to this point), this is my first class in programming java i am just needing help with the "for loops" i cant seem to get the program generate 10 random math questions. if you guys can please help i will appreciate it, i have been working on it for a couple of hours. I am not finished with it yet but thats the only thing i need help with.
import javax.swing.JOptionPane;
public class Lab5
public static void main(String[] args)
int num1 = (int) (Math.random() * 100 + 1);
int num2 = (int) (Math.random() * 100 + 1);
int sum = num1 + num2;
int product = num1 * num2;
int quotient = num1 / num2;
int difference = num1 - num2;
for (int i = 0; i > 11; i++);
int number = (int)(Math.random()*4);
if (number == 0 )
String s1 = JOptionPane.showInputDialog(null, num1 + " + " + num2 + "=" );
if(number == 1)
String s3 = JOptionPane.showInputDialog(null, num1 + " - " + num2 + "=" );
if(number == 2)
String s3 = JOptionPane.showInputDialog(null, num1 + " x " + num2 + "=" );
if(number == 3)
String s4 = JOptionPane.showInputDialog(null, num1 + " ÷ " + num2 + "=" );for (int i = 0; i > 11; i++);Two problems with this line:
1) The second part of a For loop is the constraint. You have said that for the loop to be entered, i must be greater than 11. Well since you've also told i to begin at 0, this will never happen. Thus, the loop will never enter. You may have meant less than?
2) You put a semicolon in the line. Semicolons are used to end statements. The For loop, when used as a block with curly braces, is not a single statement and does not require a semicolon. Here's the two structures of a basic For loop:
for(int i = 0; i <= 100; i++) {
//this is a block. you can put multiple statements in here and they are all part of the loop
int a = 1;
int b = i;
//if your loop only needs to use a single statement, no braces are required
for(int i = 0; i <= 100; i++)
int a = i; -
I am really struggling here with this (what seems) fairly simple labview problem. I have a set of equations that rely on the answer of the previous other formula and so forth. I can do this easily enough in excel. I tried to recreate this function in labview and have been really struggling to get it to work. I have tried using while loops and for loops, which I think is what I need to do here, but I haven't had much success. Anyways, I attached the spreadsheet with the two formulas, a .png showing the relationship of the formulas in the spreadsheet, and my .VI. Thanks for your help in advance.
Solved!
Go to Solution.
Attachments:
Formula.xlsx 42 KB
Formula.png 38 KB
Untitled 1.vi 8 KBYou need both a loop and a shift register.
Lynn
Attachments:
Looped equations.2.vi 10 KB -
Newbie needs help - stop loop...
Hey, I am new to DW and Flash but learnign pretty well (or so
I thought). Anyway, I made a simple grapic that is to fade in to a
page. It works fine. I want it to fade in and be done, but i keeps
looping. If I look in the properties area I see no place to stop
that (though the help sections says it's there somewhere). I see
"sync" and even if I set it to "event", "repeat" "0" - it still
loops when tested. How do I make this thing run once? (I also ooked
in the publish settings but didn;t find it). I am sure it is right
undr my nose somewhwere....(Flash CS3 Pro).
ThanksAnother way to stop looping is to use "stop ()". Select the
last frame of any one of your timelines. Open the actions panel.
Place the code in the first line. This stopped my test movie from
looping.
Carmen -
Help Please Loops filling up hard drive
My G5 hard drive is almost full. Logic Pro loops are a big part of this. I do have a 2nd drive. What is the right way to move the loops/audio to the 2nd drive and still access from Logic Pro?
Thanks & Happy 4thhttp://provideocoalition.com/ssimmons/story/Clean_those_adobe_media_cache_files
http://help.adobe.com/en_US/mediaencoder/cs/using/WSb8e30982e628fbec-54c04a521312559a5de-7 ffc.html -
Help a looping animation.. kind da i think
Made this script and it works fine when u move the unit over the CC it waits about 5 secounds and a little loading bar animation loads and then CC goes to the next frame but the little loading bar animation loops.
this.onEnterFrame=hitF;
function hitF(){
if(_root.unit.hitTest(_root.CC)&&!_root.unit.hitBool){
unit.build.gotoAndPlay(1);
_root.unit.hitBool=true;
startTime=getTimer();
} else if(_root.unit.hitBool&&(getTimer()-startTime)>=5000){
CC.nextFrame();
startTime=getTimer();
_root.unit.hitBool=false;
} else if(!_root.unit.hitTest(_root.CC)){
unit.build.gotoAndStop(1);
_root.unit.hitBool=false;
unit.build is the loading bar animation.
Help me solve this.If there is a point where all that is supposed to end, then you should delete the enterFrame when its job is done. Otherwise, it might be tiggering something to restart the bar...
delete this.onEnterFrame; -
Hallow I have a program that call to smart form. The user have to put course number and employee number and the program check if the student pass the course send sf and if dont send other sf .my problem is when the user put just course number in, other words he wont to print sf of all the student that do some course , I dont now how to call to smart form in loop because all the time I have a new student and the program have to check if the student pass the course or not and send sf accordingly.
I heard about at new but I dont now how to use it or if its fitting my need .
regards
IF pernr IS INITIAL .
*--For-Empty-Pernr--
SELECT objid_e
FROM yhr_score_page
INTO wa_score_tab-objid_e
WHERE objid_e IN c_course.
IF sy-subrc = 0.
APPEND wa_score_tab TO score_tab.
CLEAR wa_score_tab.
ENDIF.
ENDSELECT.
ELSE.
SELECT objid_e
FROM yhr_score_page
INTO wa_score_tab-objid_e
WHERE objid_e IN c_course
AND objid_p = pernr.
IF sy-subrc = 0.
APPEND wa_score_tab TO score_tab.
CLEAR wa_score_tab.
ENDIF.
ENDSELECT.
ENDIF.
This is the call fo the smart form
IF sum_n GE passed_nuric. " if student pass course use first function
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YHR_SCORE_SMART_FORM_PASS'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = /1bcdwb/sf00000005
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION '/1BCDWB/SF00000005'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
score_tab2 = wa_score_tab2
sum_all = sum_all
sum_n = sum_n
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
score_tab = score_tab
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*--dont pass--
ELSE.
READ TABLE score_tab INDEX 1 INTO wa_score_tab.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YHR_SCORE_SMART_FORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = /1bcdwb/sf00000002
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION '/1BCDWB/SF00000002'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
score_tab = wa_score_tab
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.LOOP AT itab.
AT NEW stud.
perform xxxx.
ENDAT.
ENDLOOP.
Refer SF
Refer this link for Smartforms
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d937ec90-0201-0010-0ca8-b6cb3b6dd1ef
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b590fd97-0301-0010-db90-d09ff93cee5a
Subroutine in smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
Style and mailing the Smartform output
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
Table,Template,Loop and Command in Smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
Maybe you are looking for
-
I cannot get into the app store my apple id is not working
i cannot get into the apple store via i tunes would not allow me to sign in
-
'Please wait while Windows Configures'
On several types of documents, including movie files, sound files, excel sheets, and powerpoint, any time I left- or right-click my computer brings up a window saying "Please wait while Windows Configures Macromedia Contribute 3". This box stays up u
-
Using plain old mp3 player with iTunes on Mac
Hi all, I want to use a plain, old USB MP3 player (mass storage-type) with iTunes on my Mac (OS X 10.4.x). I asked this question over on the Windows iTunes forum at http://discussions.apple.com/thread.jspa?threadID=1264196&tstart=0 and wondered if th
-
Can't get XLR mic to pick up sound in GarageBand.
I've tried 2 different XLR microphones, connected to MacBook using an XLR to USB cable. Help!!!
-
I'm experiencing an odd problem with a "quick and dirty" test application I built today using the ColdFusion wizzard in the production release of Flex 2 Builder. The application connects to a single datasource, displays a data grid with two fields (a