Help in loop and at new

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 don’t  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 don’t 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 don’t 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

Similar Messages

  • 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 PM

    The 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);
    }

  • Need help to partition and format new hard drive for T400

    The HDD failed in my T400. I bought a new 1TB HDD and fitted it. The diagnostic software in the BIOS did a read and controller test (Passed). When I put the Windows XP disk in the CD reader, the setup started - then stalled at the "Windows setup" page. I thought the hard drive had a write problem but apparently it must be partitioned and formatted first, before Widows setup can commence. The thing is that I can't get to the option where Windows formats the drive. In old computers, there was always a partitioning option in the BIOS setup but in my T400, there doesn't appear to be any such option. The computer has 4GB RAM, the actual model is 2767-RV8.
    Does anyone have any suggestions how to get this up and running?
    One other question is - (assuming I can get the thing working) - Is there somewhere I can load the operating system on part of the hard drive where it can act as a fall back in case the operating system gets corrupted? - i.e. something that can't get attacked by malicious software?
    Thanks in advance for any assistance.
    Ian

    Hi irivlin,
    If you are trying to clean install XP, then you have to do following setting in BIOS first:
    Press F1 to BIOS, Config -> Serial ATA (SATA) -> change to "Compatibility"
    You can change XP partition only if you are doing clean installation, otherwise you have to use 3rd party to do it.
    For backup part, there are lots of choices in the market. You might consider using XP own backup function. Lenovo got a program called Rescue and Recovery can also do backup as well.
    How to use the Backup utility to back up files and folders in Windows XP Home Edition
    http://support.microsoft.com/kb/320820/en-us
    Rescue and Recovery® 4.23 by Lenovo
    http://support.lenovo.com/en_US/product-and-parts/​detail.page?&LegacyDocID=MIGR-76225
    Fred
    T61 + X201i

  • Need help with opening and creating new card

    Does anyone know why when I try to create a new card, in PSE 6 that the file tries to open then shuts.  I have created cards before without any problem.  I don't know what has changed??????

    Does anyone know why when I try to create a new card, in PSE 6 that the file tries to open then shuts.  I have created cards before without any problem.  I don't know what has changed??????

  • Loops and Arrays help

    Hi,
    I'm a freshman in college and new to java. I am completely lost and really need help with a current assignment. Here are the instructions given by my teacher...
    Building on provided code:
    Loops and Arrays
    Tracking Sales
    Files Main.java and Sales.java contain a Java application that prompts for and reads in the sales for each of 5 salespeople in a company. Files Main.java and Sales.java can be found here http://www.ecst.csuchico.edu/~amk/foo/csci111/labs/lab6N/Main.java
    and here http://www.ecst.csuchico.edu/~amk/foo/csci111/labs/lab6N/Sales.java It then prints out the id and amount of sales for each salesperson and the total sales. Study the code, then compile and run the program to see how it works. Now modify the program as follows:
    1. (1 pts) Compute and print the average sale. (You can compute this directly from the total; no new loop is necessary.)
    2. (2 pts) Find and print the maximum sale. Print both the id of the salesperson with the max sale and the amount of the sale, e.g., "Salesperson 3 had the highest sale with $4500." Note that you don't necessarily need another loop for this; you can get it in the same loop where the values are read and the sum is computed.
    3. (2 pts) Do the same for the minimum sale.
    4. (6 pts) After the list, sum, average, max and min have been printed, ask the user to enter a value. Then print the id of each salesperson who exceeded that amount, and the amount of their sales. Also print the total number of salespeople whose sales exceeded the value entered.
    5. (2 pts) The salespeople are objecting to having an id of 0-no one wants that designation. Modify your program so that the ids run from 1-5 instead of 0-4. Do not modify the array-just make the information for salesperson 1 reside in array location 0, and so on.
    6. (8 pts) Instead of always reading in 5 sales amounts, allow the user to provide the number of sales people and then create an array that is just the right size. The program can then proceed as before. You should do this two ways:
    1. at the beginning ask the user (via a prompt) for the number of sales people and then create the new array
    2. you should also allow the user to input this as a program argument (which indicates a new Constructor and hence changes to both Main and Sales). You may want to see some notes.
    7. (4 pts) Create javadocs and an object model for the lab
    You should organize your code so that it is easily readable and provides appropriate methods for appropriate tasks. Generally, variables should have local (method) scope if not needed by multiple methods. If many methods need a variable, it should be an Instance Variable so you do not have to pass it around to methods.
    You must create the working application and a web page to provide the applications information (i.e., a page with links to the source code, the javadoc and an object model) to get full credit. You can use the example.html's from the last two labs to help you remember how to do this.
    I'm not asking for someone to do this assignment for me...I'm just hoping there is someone out there patient and kind enough to maybe give me a step by step of what to do or how to get started, because I am completely lost from the beginning of #1 in the instructions.
    Any help would be much appreciated! Thank you!
    Message was edited by:
    Scott_010
    Message was edited by:
    Scott_010

    First ask the person who gave this asignment as to why do you require two classes for this , you can have only the Sales.java class with main method in it . Anyways.
    Let Main.java have a main method which instanciates a public class Sales and calls a method named say readVal() in Sales class.
    In the readVal method of sales class define two arrays i.e ids and sales. Start prompting the user for inputting the id and sales and with user inputting values keep storing it in the respective arrays .. Limit this reading to just 5 i.e only 5 salesPerson.
    Once both the arrays are populated, call another method of Sales class which will be used for all computations and output passing both the arrays.
    In this new method say Compute() , read values from array and keep calculating total,average and whatever you want by adding steps in just this loop. You can do this in readval method too after reading the values but lets keep the calculation part seperate from input.
    You must create the working application and a web page to provide the applications information (i.e., a page with links to the source code, the javadoc and an object model) to get full credit. You can use the example.html's from the last two labs to help you remember how to do this. I think this is ur personal stuff , but if you want to use web page , you probably will require to use servlet to read values from the html form passed to the server.

  • Drag loop to create  new region and....its different?!

    im dragging a loop from loop browser to create a region , the loop "hip hop beat 19" is a pattern with 18th note(multiple hits occuring quickly)hi hat hits. Once the loop creates a new track for itself it changes, now the same loop is generating 8th notes for the hi hat hits(less more sparse) HELP

    im dragging a loop from loop browser to create a
    region , the loop "hip hop beat 19" is a pattern with
    18th note(multiple hits occuring quickly)hi hat hits.
    Once the loop creates a new track for itself it
    changes, now the same loop is generating 8th notes
    for the hi hat hits(less more sparse) HELP
    "and you didn't hit any button to quantize the region? " no, I tried starting brand new gb file and draggged hip hop beat 19 into blank field,and viola, a different pattern.I work with a producer in boston(im in ny) and he (at my request) tried this loop and found same glitch,as a matter of fact we have been going through the loop library one at a time and have found all of this bank of hip hop beats to be affected in the same manor, but no others so far, which is a relief , i was suspect all my remix tool loops where going to be screwy.i have been working with the loop in its track region, and been unable to change just the hi hat time.

  • I have purchased actual ring tones, not songs or MP3s, RING TONES.  They used to be on my Iphone but when I got a new laptop and downloaded new ITunes, they are showing up in Itunes in RINGTONES, but will not transfer to my iphone. They are checked. Help?

    I have purchased actual ringtones from the ITunes store.  They were working fine on my Iphone 3 before, but I got a new laptop and the new version of ITunes, and now even though they are listed as ring tones on my ITunes, they will not transfer to my Iphone.  (Please do not tell me they are songs and not ring tones, they are definitely RING TONES!)  Can anyone help me with this?  Thanks.

    Use the Transfer Purchases command in the File menu of iTunes.
    (60931)

  • I have Lightroom 4 and a new 70D camera and when I try to important my photos Lightroom says it doesn't recognize my CR2 files.  I have downloaded plugin for the camera, but it still doesn't work.  Can you help?

    I have Lightroom 4 and a new 70D camera and when I try to important my photos Lightroom says it doesn't recognize my CR2 files.  Can someone help?  I have downloaded 8.3 from Adobe, but still doesn't work?

    Lightroom doesn't use the Camera Raw plug-in. All of the Camera Raw technology is part of the Lightroom program. You will either have to upgrade to Lightroom 5 or use the DNG converter to create digital negative copies that can be used with Lightroom 4.

  • HT4623 I have a 3g iPhone and a new epson imprint compatible printer but the iPhone can't see it. I have downloaded all the software. Help

    I have a 3g iPhone and a new epson imprint compatible printer but the iPhone can't see it. I have downloaded all the software.
    But my phone does not recognises the printer. Can anyone Help? Thanks

    to trouble shoot look here http://www.apple.com/support/iphone/assistant/airprint/#section_1

  • TS3376 How do I find the menue where I can select the list of previous phones I have had and my new one ? at the moment it is still set to an old one so everytime I try to set it up it tells me it it's the wrong one - gggrrrrr help please

    How do I find the menue where I can select the list of previous phones I have had and my new one ? at the moment it is still set to an old one so everytime I try to set it up it tells me it it's the wrong one - gggrrrrr help please

    iPods (except for iPod touch) are not linked to any iTunes "account."  They are associated with your iTunes library. The account in iTunes is your Apple ID, and that is used to buy and download content from the iTunes Store.  It is not required to use an iPod.
    The 1st (and 2nd) gen shuffle can only be used with one iTunes library at a time.  When you connect it, iTunes should prompt you to start using it with your iTunes library, and warn that the shuffle's existing content will be erased.  Have iTunes erase the shuffle, and it will be associated with your iTunes library going forward.  You can then add content to your shuffle.
    The need for the previous owner's Apple ID and password should only come up if you are trying to transfer existing content from the shuffle to your iTunes library, AND the previous owner had content purchased from the iTunes Store.  Just cancel out of that step, if iTunes asks.

  • I just bought a mac mini over the weekend. I saved items from my old G4 to an external hard drive. I go to plug in the external hard drive and the new computer is not recognizing it. Help.

    I just bought a mac mini over the weekend. I saved items from my old G4 to an external hard drive. I go to plug in the external hard drive and the new computer is not recognizing it. Help.
    Here is the information I have. The external hard drive is a 120GB Acomdata. It has both USB and Firewire. When I go to plug in to the mac mini through USB, it is not being recognized. When I switch to Firewire on the old computer I can see it, however when I go to USB it is not being recognized (even on the old computer).
    I'm at a loss as to what to do. Any advice would be helpful.

    Shalese wrote:
    Have you ever tried the FW 400 to 800 adapter?
    I have used them on multiple occasions and they work just fine.
    Try this (maybe you already have):
    -Boot Mini with drive disconnected.
    -Do not connect drive but turn it on
    -wait a few seconds for drive to spin up
    -plug cable into the Mini then into drive.
    This is an old drive and may have some timing
    issues.
    I had an Acomdata drive a long time ago.  It
    worked fine with FW but USB was flakey.

  • I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help

    I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help says File >Library >Export playlist and choose XML, or to save a copy of all your playlists, File > Library > Export Library, "the Exported info is saved in XML format."  Then it says, "to import an iTunes playlist, File > Library > Import Playlist".  Now I am assuming I do that import part on the Air, but when I try it doesn't recognize anything that can be imported - what am I missing??? Aside from a clue...

    Thanks, Jim, for taking the time, but the reply is unfortunately vague in the exact area of my confusion!  "you need to copy that file to your new computer..."  Well, the Import/Export instructions make it seem as if the two computers should be able to communicate this file thru wifi, but that's the linkage I can't seem tocreate with Import/Export.  Should I instead email a copy to myself (thats what applecare suggested)?  Copy it to and from a thumb drive?  But then place the file where?  And the article was helpful, but should I be trying to move the Library file or the Library.xml file (as iTunes Help suggests)?  Sorry to be so clueless about it...I suppose I buy Apple in the hopes of not having to think about this stuff, which approach seems not to be serving me well. Thanks again for your time!

  • I need help with the sync and the new update.

    I have had 3 new updates recently. I'm now into iTunes 8.1-8.6 or something. I've got two problems that I can't find answers for in the help.
    First off, The new iTunes is pink with a black side-bar. I was wondering if there is a way to change it back to white and gray.
    Next, when I plug my iPod into the coputer, it says that it has detected the iPod, but can't read it. It then tells me to unplug it and try again. I have done this over 300 times, over two months. It dosn't work. My iPod still dosn't read, and I now have almost twice as many songs on iTunes, as I do on my iPod.
    Please help.

    My computer tells me iTunes 8.0 is the most current version. I'll assume that's what you're running, but you can check by opening iTunes and going to Help > About iTunes.
    You can resolve the color issue by:
    Open your Control Panel
    Click "Switch to Classic View" on the left
    Open the Display icon
    Choose the Settings tab
    Move your color settings to highest: 32-bit
    Regarding the iPod error... what type of iPod is it?
    CG

  • HT201269 hi i need help, i just go a new iPhone 5 and i want to put all my backed up stuff on, but it doesn't show on the list, how do i get all my stuff back and yes i did backup the old phone

    hi i need help, i just go a new iPhone 5 and i want to put all my backed up stuff on, but it doesn't show on the list, how do i get all my stuff back and yes i did backup the old phone

    Follow the explicit instructions in the article from which the thread was started and restore the device from the backup of the previous device.

  • Tried to check on updates for CS6 64 bit - Received message saying application manager may be damaged - download and install new copy - when I try this I receive message ERROR 404 I have a PC - any help would be gratefully received - thanks - William

    Tried to check on updates for CS6 64 bit - Received message saying application manager may be damaged - download and install new copy - when I try this I receive message ERROR 404 I have a PC - any help would be gratefully received - thanks - William

    reset your preferences:
    dreamweaver:  http://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs4-cs5.html
    flash:  http://helpx.adobe.com/flash/kb/re-create-preferences-flash-professional.html
    indesign:  https://forums.adobe.com/thread/526990
    lightroom:  http://www.lightroomforums.net/showthread.php?14226-Resetting-%28or-Trashing-%29-the-Light room-Preferences-file
    photoshop:  https://forums.adobe.com/thread/375776
    if that fails, uninstall ps, clean (Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6) and reinstall.  then use the manual updates.

Maybe you are looking for

  • How do i get a numpad to work in windows 7?

    HI, for this certain program, a lot of the features require buttons like the numpad keys or the right control key, but my apple wireless keyboard doesnt have those. is there a way i can remap it so that a combination of keys will get the numpad to wo

  • Select-query with *

    Hi, I wish to select rows from a database. This is the query I wrote: "SELECT * FROM opencalls WHERE ProblemDescription LIKE '*upgrade*'". When I run this query in MS Access itself, there is no problem, I get the required rows. But when I run it in m

  • Obsolete Keywords from SAP version 4.6C to ECC 6.0

    Hi , I want to upgarde my sap system from version 4.6c to ECC 6.0. Can anyone provide me the list of obsolete keywords that are in 4.6c and the new keyword for tht in ECC6.0? Thanks in advance

  • I have lost the icon for my calendar

    However, when I do a search on my iPhone, the calendar comes up.  Can anyone please tell me how to restore the icon please?

  • Problem during generating cap file

    hello u all when i am tried to generate a cap file using class file by Converter exception is thown name as java.util.Zip.ZipException ------------please help me solve it.