Smartforms and its internal table

Hi All!
From the main program, I call the FM SSF_FUNCTION_MODULE_NAME
and later "call lf_fm_name" as below shown.
The generated FM name gets an "internal table" in the tables parameter.
And now how can I to treat now this internal table within smart forms?
Please can you sequential explain the treatment. How can I acces
these datas of this internal table in the smartforms
reagards
ilhan
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
    formname                 = lv_pick_formname
*       VARIANT                  = ' '
*       DIRECT_CALL              = ' '
  IMPORTING
    fm_name                  = lf_fm_name
   EXCEPTIONS
     no_form                  = 1
     no_function_module       = 2
     OTHERS                   = 3.
  IF sy-subrc <> 0.
    IF sy-subrc = 1.
      MESSAGE e061.
    ELSEIF sy-subrc = 2.
      MESSAGE e062.
    ELSEIF sy-subrc = 3.
      MESSAGE e063.
    ENDIF.
  ENDIF.
  CALL FUNCTION lf_fm_name
      TABLES    lt_ausgabe_data       = lt_ausgabe_data

what ever you pass from program to smartforms you need to declare in
GLOBAL INTERFACE -> Import parameter.(in the driver program export parameter). make sure u use the same name in the SMARTFORM GLOBAL INTERFACE - > import parameter.
for more about smartforms go thru these link
for Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Please check the tables TNAPR and TTXFP for Standard Smartforms.
See the note 595812: it explain how to download the preconfigured smartforms.
Detailed information can be accessed at the site:
http://service.sap.com/preconfiguredforms OR
http://service.sap.com/smb/development/preconfiguredforms.
To download preconfigured smartform package, please:
1. Go to http://service.sap.com/installations, select tab "download".
2. On the right hand side screen, locate navigation tree node
SAP Software Distribution Center->Download->Installations and Upgrades->
Entry by Application Group.
3. In the main window (right hand side), follow the path
SAP Best Practices->Best Practices for mySAP All-in-One-> PRECONFIGURED
SMART FORMS, you can find available preconfigured smartform versions.
regards,
Prabhu
reward if it is helpful

Similar Messages

  • Creation of Sorted and Standard and Hashed Internal Tables ..

    Hi ..
    Pls  specify me.. how to create .. sorted ,Standard and Hashed Internal Tables...
    pls give me  the full code  regarding ...this ..
    Thnks

    Standard tables
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
    Sorted tables
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
    Hashed tables
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    Special Features of Standard Tables
    Unlike sorted tables, hashed tables, and key access to internal tables, which were only introduced in Release 4.0, standard tables already existed several releases previously. Defining a line type, table type, and tables without a header line have only been possible since Release 3.0. For this reason, there are certain features of standard tables that still exist for compatibility reasons.
    Standard Tables Before Release 3.0
    Before Release 3.0, internal tables all had header lines and a flat-structured line type. There were no independent table types. You could only create a table object using the OCCURS addition in the DATA statement, followed by a declaration of a flat structure:
    DATA: BEGIN OF <itab> OCCURS <n>,
    <fi> ...
    END OF <itab>.
    This statement declared an internal table <itab> with the line type defined following the OCCURS addition. Furthermore, all internal tables had header lines.
    The number <n> in the OCCURS addition had the same meaning as in the INITIAL SIZE addition from Release 4.0. Entering ‘0’ had the same effect as omitting the INITIAL SIZE addition. In this case, the initial size of the table is determined by the system.
    The above statement is still possible in Release 4.0, and has roughly the same function as the following statements:
    TYPES: BEGIN OF <itab>,
    <fi> ...,
    END OF <itab>.
    DATA <itab> TYPE STANDARD TABLE OF <itab>
    WITH NON-UNIQUE DEFAULT KEY
    INITIAL SIZE <n>
    WITH HEADER LINE.
    In the original statement, no independent data type <itab> is created. Instead, the line type only exists as an attribute of the data object <itab>.
    Standard Tables From Release 3.0
    Since Release 3.0, it has been possible to create table types using
    TYPES <t> TYPE|LIKE <linetype> OCCURS <n>.
    and table objects using
    DATA <itab> TYPE|LIKE <linetype> OCCURS <n> WITH HEADER LINE.
    The effect of the OCCURS addition is to construct a standard table with the data type <linetype>. The line type can be any data type. The number <n> in the OCCURS addition has the same meaning as before Release 3.0. Before Release 4.0, the key of an internal table was always the default key, that is, all non-numeric fields that were not themselves internal tables.
    The above statements are still possible in Release 4.0, and have the same function as the following statements:
    TYPES|DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE DEFAULT KEY
    INITIAL SIZE <n>
    WITH HEADER LINE.
    They can also be replaced by the following statements:
    Standard Tables From Release 4.0
    When you create a standard table, you can use the following forms of the TYPES and DATA statements. The addition INITIAL SIZE is also possible in all of the statements. The addition WITH HEADER LINE is possible in the DATA statement.
    Standard Table Types
    Generic Standard Table Type:
    TYPES <itab> TYPE|LIKE STANDARD TABLE OF <linetype>.
    The table key is not defined.
    Fully-Specified Standard Table Type:
    TYPES <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE <key>.
    The key of a fully-specified standard table is always non-unique.
    Standard Table Objects
    Short Forms of the DATA Statement :
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>.
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH DEFAULT KEY.
    Both of these DATA statements are automatically completed by the system as follows:
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE DEFAULT KEY.
    The purpose of the shortened forms of the DATA statement is to keep the declaration of standard tables, which are compatible with internal tables from previous releases, as simple as possible. When you declare a standard table with reference to the above type, the system automatically adopts the default key as the table key.
    Fully-Specified Standard Tables:
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE <key>.
    The key of a standard table is always non-unique.
    Internal table objects
    Internal tables are dynamic variable data objects. Like all variables, you declare them using the DATA statement. You can also declare static internal tables in procedures using the STATICS statement, and static internal tables in classes using the CLASS-DATA statement. This description is restricted to the DATA statement. However, it applies equally to the STATICS and CLASS-DATA statements.
    Reference to Declared Internal Table Types
    Like all other data objects, you can declare internal table objects using the LIKE or TYPE addition of the DATA statement.
    DATA <itab> TYPE <type>|LIKE <obj> WITH HEADER LINE.
    Here, the LIKE addition refers to an existing table object in the same program. The TYPE addition can refer to an internal type in the program declared using the TYPES statement, or a table type in the ABAP Dictionary.
    You must ensure that you only refer to tables that are fully typed. Referring to generic table types (ANY TABLE, INDEX TABLE) or not specifying the key fully is not allowed (for exceptions, refer to Special Features of Standard Tables).
    The optional addition WITH HEADER line declares an extra data object with the same name and line type as the internal table. This data object is known as the header line of the internal table. You use it as a work area when working with the internal table (see Using the Header Line as a Work Area). When you use internal tables with header lines, you must remember that the header line and the body of the table have the same name. If you have an internal table with header line and you want to address the body of the table, you must indicate this by placing brackets after the table name (<itab>[]). Otherwise, ABAP interprets the name as the name of the header line and not of the body of the table. You can avoid this potential confusion by using internal tables without header lines. In particular, internal tables nested in structures or other internal tables must not have a header line, since this can lead to ambiguous expressions.
    TYPES VECTOR TYPE SORTED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    DATA: ITAB TYPE VECTOR,
    JTAB LIKE ITAB WITH HEADER LINE.
    MOVE ITAB TO JTAB. <- Syntax error!
    MOVE ITAB TO JTAB[].
    The table object ITAB is created with reference to the table type VECTOR. The table object JTAB has the same data type as ITAB. JTAB also has a header line. In the first MOVE statement, JTAB addresses the header line. Since this has the data type I, and the table type of ITAB cannot be converted into an elementary type, the MOVE statement causes a syntax error. The second MOVE statement is correct, since both operands are table objects.
    plz reward if useful

  • How to compare a ztable and an internal table

    Hi, experts.
    I have a transparent table ztable and an internal table itab, with same fields. What I need to do is: if those records in itab are not existing in ztable, append them to ztable; if these records in itab has been existing in ztable, update them in ztable.
    How to write codes to do above task in ABAP program?
    Thank you very much.
    Tom

    Hi
    DATA : itab1 type ztable.
    if values in itab not in itab1.
    append itab values to itab1.
      endif.
    if values exist in itab and itab1.
    modify itab1 with respect to itab
    endif.
    finally
       modify ztable from itab1.

  • Are field symbols and Dynamic internal tables consistant?

    Hi,
    Are field symbols and Dynamic internal tables
    always consistent?
    In my program I m creating a dynamic itab and assignig values to it using <FS>, sometimes the program fails to execute assign <Fs> statement...
    this happens once in 3 to 4 runs
    any solution...
    I have proper clear and refresh statements in program.
    Thanks,
    Hardik

    Anurag,
    Thanks for a quick reply. Here I am sending a small piece of my code.
    MOVE-CORRESPONDING OUTTAB TO DYNTAB.
          CLEAR IT_UDATE.
          CLEAR : T_KBETR .
          READ TABLE IT_UDATE WITH KEY UDATE = OUTTAB-UDATE.
          CONCATENATE 'DYNTAB-KBETR' IT_UDATE-CO_POS INTO T_KBETR.
          ASSIGN (T_KBETR) TO <FS> .
          SUBRC5 = SY-SUBRC .
          IF SUBRC5 = 0 .
              <FS> =  OUTTAB-KBETR .
          ENDIF .
    read statement will always return CO_POS .
    while debuging this code a few times
    <b>ASSIGN (T_KBETR) TO <FS> .</b>
    returns sy-subrc = 4
    and that was leading the program to short dump earlier.
    now, as I have a check DYNTAB-KBETR holds no value on display.
    this happens very few times. (most of the times report is displaying desired output)
    Thanks,
    Hardik

  • Best way to declare and use internal table

    Hi all,
    As per my knoledge there are various techeniques (Methods) to declare and use the internal tables.
    Please Suggest me the Best way to declaring and using internal table ( WITH EXAMPLE ).
    Please Give the reason as well how the particular method is good ?
    What are benefits of particular method ?
    Thanks in advance.
    Regards
    Raj

    Hello Raj Ahir,
    There are so many methods to declare an internal table.
    Mainly I would like to explain 2 of them mostly used.
    1. Using Work Area and
    2. With header line.
    This with header line concept is not suggestable, because, when we shift the code to oops concept.. it doesn't work... Because OOPS doesn't support the Headerline concept...
    But it all depends on the situation.
    If you are sure that your program doen't make use of the OOPs concept, you can use HEADER LINE concept. If it invols OOPs use WORK AREA concept.
    Now I'l explain these two methods with an example each...
    1. Using Work area.
    TABLES: sflight.
    DATA: it_sflight TYPE TABLE OF sflight.
    DATA: wa_sflight LIKE LINE OF it_sflight.
    SELECT *
      FROM sflight
      INTO it_sflight
      WHERE <condition>.
      LOOP AT it_sflight INTO wa_sflight.
        WRITE / wa_sflight.
      ENDLOOP.
      In this case we have to transfer data into work area wa_sflight.
    We can't access the data from the internal table direclty without work
    area.
    *<===============================================
    2. Using Header line.
      DATA: BEGIN OF it_sflight OCCURS 0,
              carrid LIKE sflight-carrid,
              connid LIKE sflight-connid,
              fldate LIKE sflight-fldate,
            END OF it_sflight.
      SELECT *
        FROM sflight
        INTO it_sflight
        WHERE <condition>.
        LOOP AT it_sflight INTO wa_sflight.
          WRITE / wa_sflight.
        ENDLOOP.
    In this case we can directly access the data from the internal table.
    Here the internal table name represents the header. for each and every
    interation the header line will get filled with new data. If you want to
    represnent the internal table body you can use it_sflight[].
    *<======================================================
    TYPES: BEGIN OF st_sflight,
             carrid LIKE sflight-carrid,
             connid LIKE sflight-connid,
             fldate LIKE sflight-fldate,
           END OF st_sflight.
    DATA: it_sflight TYPE TABLE OF st_sflight,
          wa_sflight LIKE LINE OF it_sflight.
    This is using with work area.
    DATA: it_sflight LIKE sflight OCCURS 0 WITH HEADER LINE.
    This is using header line.
    <b>REWARD THE POINTS IF IT IS HELPFUL.</b>
    Regards
    Sasidhar Reddy Matli.
    Message was edited by: Sasidhar Reddy Matli
            Sasidhar Reddy Matli

  • ALV display using dynamic field catalog and dynamic internal table

    hi ,
    please guide me for ALV display using dynamic field catalog and dynamic internal table.
    Thank you.

    Hi Rahul,
    maybe thread dynamic program for alv is helpful for you. More information about the [SAP List Viewer (ALV)|http://help.sap.com/saphelp_nw70/helpdata/EN/5e/88d440e14f8431e10000000a1550b0/frameset.htm]. Also have a look into the example programs SALV_DEMO_TABLE*.
    Regards Rudi

  • Differences between Standard , sorted and hashed internal tables

    Can any body please tell me what are the main Differences between
    1) <b>Standard internal table</b>
    2) <b>Hashed internal table</b>
    3) <b>Sorted internal table</b>
    Please give me a clear idea about these Three.
    Thanks
    Prabhudutta<b></b>

    Hi,
    <b>Standard Internal Tables</b>
    Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.
    This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command).  The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to
    the number of table entries.
    <b>Sorted Internal Tables</b>
    Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique, or non-unique, and you must specify either UNIQUE or NON-UNIQUE in the table definition.  Standard tables and sorted tables both belong to the generic group index tables.
    This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of
    table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.
    <b>Hashed Internal Tables</b>
    Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.
    This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and
    using internal tables that are similar to database tables.
    Regards
    Sudheer

  • Smartform & ABAP Webdynpro & Internal table

    Hi Expert,
    I am able to open the smartfrom by using ABAP Webdynpro.
    But when I try to add the table under "Global Settings -> From Interface -> Table"
    Paramemter Name       Type Assignment    Associated Type
    I_ZSG_PAY_DATA     Like                          ZSG_PAY_DATA
    It works fine when I test it in t-code SMARTFORMS. But when I use the same ABAP Webdynpro program to open this smartform, the error appear.
    "Calling Parameter incorrect"
    Could you please let me know how to fix it?
    Thanks a lot,
    WF

    Hi William,
    If you have a working smartform then you should be able to display it in WD by passign its XSTRING to the PDFSOURCE of it.
    Just check that where you have written the code to get the XSTRING of smartform in WD. You might have modified the smartform interface and forgot to call the revised FM generated after the smartform was changed in WD.
    Just re-write the entire code to generate XSTRING for smartform and see if it works or not.
    You can also try to put a break point in the code and see where exactly it is failing i.e. whether it is to do with calling smartform or converting it or WD related.
    Thanks,
    Abhishek

  • Smartform loop into internal table problem

    hello experts,
    i am doing an example given in **************** regarding smartforms. I am getting problem which doing the smartforms . please help me.
    http://****************/Tutorials/Smartforms/SFMain.htm
    in that i am doing the program
    Working with loop.
    I have done exactly as the screen shots in the program.
    Now in the main window i created a loop.
    in that loop i am not getting the option internal table.
    But it is showing as operand . It is in the data tab of the loop.
    I searched the all the tabs in the loop but did not find the option  internal table.
    so then i ticked the operand and i did as speified in the screen shots.
    it_tab into fs_tab
    Then i created a text and then placed &fs_tab-vbeln& etc.
    then i executed the smartform now in the output i am not getting the sales order number , item etc.
    The output is showing like
    &fs_tab-vbeln&     &fs_tab-posnr&   etc.
    please guide me how to get the internal table option in  the loop. And also tell me how to rectify this problem

    thanks for all the replies.
    I will give all  at the time of closing my thread.
    Hi Sravanthi -> in loop node i am not getting the internal table insted of that i am getting operand in the data tab.
    This is my main problem.I dont why operand is comming there.
    my version is 4.7e
    Hi Karthik and swati -> i simply hard coded the statements in the text as shown in the example.
    Now i will try with the add field.
    But please tell me why i am not getting internal table option in loop.

  • Smartforms - pass dynamic internal tables

    Hello experts,
    In my smartform print program, I have created a dynamic internal table using method CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE where in my dynamic internal table <DYN_TABLE> is declared as
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>.
    I am populating <DYN_TABLE> and passing it on to my smartform. Now my question is, inside my smartform, how can I declare this dynamic table <DYN_TABLE> in form interface? Please let me know. Thanks.

    This could be one of the solution.
    1. Create table type using data element EDI_SDATA (char 1000) , say ZTTDYN .
    2. Use this as importing paramter your smarform.
    3. In print program transfer the content from dynamic internal table to internal table define using ZTTDYN. You can comma seperate then fields.
    4. Pass this comma separated internal table to smartform.
    5. And finally proces this data in smartform.

  • Problem in Smartforms Printing two internal tables

    Dear ABAPers,
           I am working in SAP Smartforms.
    I am passing two internal tables in Main Window one after another.After Printing the Data in the first internal Table.It prints the data in the Second internal table.My requirement is it should print from the Next Page.
    It is very Urgent Requirement.Please help me to solve this problem.
    Thanks & Regards,
    Ashok.

    Hi,
    Create a new page in your form in one page put one internal table and in the second page put the other.
    ->in each page in the page attributes select the nextpage = same page name
    -> After the loop of the first internal table in first page
    ->create a command node and select the checkbox goto newpage and select the second page in the dropbox.
    Thanks,
    NN.

  • Regarding Exporting and Importing internal table

    Hello Experts,
    I have two programs:
    1) Main program: It create batch jobs through open_job,submit and close job.Giving sub program as SUBMIT.
    I am using Export IT to memory id 'MID' to export internal table data to sap memory in the subprogram.
    The data will be processed in the subprogram and exporting data to sap memory.I need this data in the main program(And using import to get the data,but it is not working).
    Importing IT1 from memory id 'MID' to import the table data in the main program after completing the job(SUBMIT SUBPROGRAM AND RETURN).
    Importing is not getting data to internal table.
    Can you please suggest something to solve this issue.
    Thank you.
    Regards,
    Anand.

    Hi,
    This is the code i am using.
    DO g_f_packets TIMES.
    * Start Immediately
           IF NOT p_imm IS INITIAL .
             g_flg_start = 'X'.
           ENDIF.
           g_f_jobname = 'KZDO_INHERIT'.
           g_f_jobno = g_f_jobno + '001'.
           CONCATENATE g_f_jobname g_f_strtdate g_f_jobno INTO g_f_jobname
                                                  SEPARATED BY '_'.
           CONDENSE g_f_jobname NO-GAPS.
           p_psize1 = p_psize1 + p_psize.
           p_psize2 = p_psize1 - p_psize + 1.
           IF p_psize2 IS INITIAL.
             p_psize2  = 1.
           ENDIF.
           g_f_spname = 'MID'.
           g_f_spid = g_f_spid + '001'.
           CONDENSE g_f_spid NO-GAPS.
           CONCATENATE g_f_spname  g_f_spid INTO g_f_spname.
           CONDENSE g_f_spname NO-GAPS.
    * ... (1) Job creating...
           CALL FUNCTION 'JOB_OPEN'
             EXPORTING
               jobname          = g_f_jobname
             IMPORTING
               jobcount         = g_f_jobcount
             EXCEPTIONS
               cant_create_job  = 1
               invalid_job_data = 2
               jobname_missing  = 3
               OTHERS           = 4.
           IF sy-subrc <> 0.
             MESSAGE e469(9j) WITH g_f_jobname.
           ENDIF.
    * (2)Report start under job name
           SUBMIT (g_c_prog_kzdo)
                  WITH p_lgreg EQ p_lgreg
                  WITH s_grvsy IN s_grvsy
                  WITH s_prvsy IN s_prvsy
                  WITH s_prdat IN s_prdat
                  WITH s_datab IN s_datab
                  WITH p1      EQ p1
                  WITH p3      EQ p3
                  WITH p4      EQ p4
                  WITH p_mailid EQ g_f_mailid
                  WITH p_psize EQ p_psize
                  WITH p_psize1 EQ p_psize1
                  WITH p_psize2 EQ p_psize2
                  WITH spid     EQ g_f_spid
                  TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                  VIA JOB g_f_jobname NUMBER g_f_jobcount AND RETURN.
    *(3)Job closed when starts Immediately
           IF NOT p_imm IS INITIAL.
             IF sy-index LE g_f_nojob.
               CALL FUNCTION 'JOB_CLOSE'
                 EXPORTING
                   jobcount             = g_f_jobcount
                   jobname              = g_f_jobname
                   strtimmed            = g_flg_start
                 EXCEPTIONS
                   cant_start_immediate = 1
                   invalid_startdate    = 2
                   jobname_missing      = 3
                   job_close_failed     = 4
                   job_nosteps          = 5
                   job_notex            = 6
                   lock_failed          = 7
                   OTHERS               = 8.
               gs_jobsts-jobcount = g_f_jobcount.
               gs_jobsts-jobname  = g_f_jobname.
               gs_jobsts-spname   = g_f_spname.
               APPEND gs_jobsts to gt_jobsts.
             ELSEIF sy-index GT g_f_nojob.
               CLEAR g_f_flg.
               DO.                         " Wiating untill any job completion
                 LOOP AT gt_jobsts into gs_jobsts.
                   CLEAR g_f_status.
                   CALL FUNCTION 'BP_JOB_STATUS_GET'
                     EXPORTING
                       JOBCOUNT                         = gs_jobsts-jobcount
                       JOBNAME                          = gs_jobsts-jobname
                    IMPORTING
                       STATUS                           = g_f_status
    *            HAS_CHILD                        =
    *          EXCEPTIONS
    *            JOB_DOESNT_EXIST                 = 1
    *            UNKNOWN_ERROR                    = 2
    *            PARENT_CHILD_INCONSISTENCY       = 3
    *            OTHERS                           = 4
                   g_f_mid = gs_jobsts-spname.
                   IF g_f_status = 'F'.
                     IMPORT gt_final FROM MEMORY ID g_f_mid .
                     FREE MEMORY ID gs_jobsts-spname.
                     APPEND LINES OF gt_final to gt_final1.
                     REFRESH gt_prlist.
                     CALL FUNCTION 'JOB_CLOSE'
                       EXPORTING
                         jobcount             = g_f_jobcount
                         jobname              = g_f_jobname
                         strtimmed            = g_flg_start
                       EXCEPTIONS
                         cant_start_immediate = 1
                         invalid_startdate    = 2
                         jobname_missing      = 3
                         job_close_failed     = 4
                         job_nosteps          = 5
                         job_notex            = 6
                         lock_failed          = 7
                         OTHERS               = 8.
                     IF sy-subrc = 0.
                       g_f_flg = 'X'.
                       gs_jobsts1-jobcount = g_f_jobcount.
                       gs_jobsts1-jobname  = g_f_jobname.
                       gs_jobsts1-spname   = g_f_spname.
                       APPEND gs_jobsts1 TO gt_jobsts.
                       DELETE TABLE gt_jobsts FROM gs_jobsts.
                       EXIT.
                     ENDIF.
                   ENDIF.
                 ENDLOOP.
                 IF g_f_flg = 'X'.
                   CLEAR g_f_flg.
                   EXIT.
                 ENDIF.
               ENDDO.
             ENDIF.
           ENDIF.
           IF sy-subrc <> 0.
             MESSAGE e539(scpr) WITH g_f_jobname.
           ENDIF.
           COMMIT WORK .
         ENDDO.

  • Populate and display internal table results using search help exit...

    I have copied F4IF_SHLP_EXIT_EXAMPLE and made changes. I want this search help exit to populate and display contents related to 'FIELD1' when the user enters a specific value for it in the search help screen, meaning when the user restricts the search by that value.  For field2, field3, field4, field5, field6, field7, and field8 I am using a custom view.
    Following is the code:
    TYPES:  BEGIN OF t_search,
                   field2 TYPE field2,
                   field3 TYPE field3,
                   field4 TYPE field4,
                   field5 TYPE field5,
                   field6 TYPE field6,
                   field7 TYPE field7,
                   field8 TYPE field8,
                   field1 TYPE field1,
                END OF t_search.
      DATA: it_itab TYPE TABLE OF t_search,
            wa TYPE t_search,
         wa_selopt TYPE ddshselopt,
            wa_fielddescr TYPE dfies.
    ranges: r_field1 for std_table1-field1
    STEP SELECT    (Select values)
        FREE: r_field1.
    **Get the value entered for FIELD1 in search help
        LOOP AT shlp-selopt INTO wa_selopt.
          CASE wa_selopt-shlpfield.
            WHEN 'FIELD1'.
              r_field1-sign = wa_selopt-sign.
              r_field1-option = wa_selopt-option.
              r_field1-low = wa_selopt-low.
              r_field1-high = wa_selopt-high.
              APPEND r_field1.
              CLEAR: r_field1.
          ENDCASE.
        ENDLOOP.
    **Select 'ID' and 'FIELD1' from table into lt_itab
        SELECT id field1
              INTO TABLE lt_itab
                FROM std_table1
                  WHERE field1 IN r_field1.
        IF sy-subrc = 0.
    **Now, based on the particular IDs from lt_itab, I need to select other values
    from other tables which also have 'ID' as the key.
           SELECT std_table2~field2
                std_table2~field3
                std_table3~field4
                std_table3~field5
                std_table3~field6
                std_table4~field7
                std_table4~field8
                std_table1~field1
              INTO CORRESPONDING FIELDS OF TABLE it_itab
              FROM std_table2
                         INNER JOIN std_table3 ON
                                std_table3mandt = std_table2mandt AND
                                std_table3id = std_table2id
                         INNER JOIN std_table4 ON
                                std_table4mandt = std_table2mandt AND
                                std_table4id = std_table2id
                         INNER JOIN std_table1 ON
                                std_table1mandt = std_table2mandt AND                                           std_table1id = std_table2id
              WHERE
                    std_table1~field1 IN r_field1.
    'id' is common in all the std_tables --> std_table1, std_table2, std_table3, std_table4.
    STEP DISP     (Display values)
    **Then I need to gather all the results in my internal table it_itab and display
    in search help results for the value of FIELD1 entered by the user in the search help.
        CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
          EXPORTING
            parameter   = 'FIELD1'
            fieldname   = 'FIELD1'                          
          TABLES
            shlp_tab    = shlp_tab                                   
            record_tab  = record_tab
            source_tab  = it_itab
          CHANGING
            shlp        = shlp
            callcontrol = callcontrol.
    I am not getting all the data in my internal table and wanted to know if there is anyting wrong in my select statement.
    Any guidance will be appreciated and awarded appropriate points.
    Thanks.

    the webdynpro fieldname and the search help input parameter name were made same.

  • How to delete a Record in  Masterdata  and its Child Tables

    Hi ,
    i want to delete a  record in masterdata and its childtable .
    I am using generalservices.But it  gets error "Attempt to read or write protected memory"
    If there is another solution to delete records in all child tables.
    Edited by: tharunireddy on Aug 13, 2010 3:08 PM

    Hi,
    There must be something wrong with your code.
    Please post it here so we can determine the problem and present a solution.
    Regards,
    Vítor Vieira

  • How to select and sum  internal table records

    Dear Friends
    I kindly ask you if we have select statement
       if s_mtart = 'z003'
          select single pvprs from ckmlcr into ckmlcr-pvprs
    where poper EQ s_poper and
          kalnr = itab2-kalnr  and
          bdatj = itab2-bdatj and
          curtp = itab2-curtp.
    like this how can I calculate how many record it got and I want to get summation of this field(pvprs).And for all poper's must contain.
      Please  Let me remind you my itab is already open I didn't put any thing for this situation

    it seems to be you written this SELECT in a loop. if so,
    instead of pushing the values into ckmlcr-pvprs ,create an internal table
    data : begin of itab,
         pvprs  type ckmlcr-pvprs ,
        end of itab.
    then just after that SELECT SINGLE,
    select single pvprs from ckmlcr <b>into ITAB-pvprs</b>
    where poper EQ s_poper and
    kalnr = itab2-kalnr and
    bdatj = itab2-bdatj and
    curtp = itab2-curtp.
    IF SY-SUBRC = 0.
      APPEND ITAB.
    here either you can use APPEND OR COLLECT.
    If you use COLLECT,all the values will get summed up and final sum will be in the table ITAB-pvprs.
    ENDIF.
    After all loops your itab will have the totals.
    DESCRIBE TABLE ITAB LINES V_LINES.
    V_LINES Will have total no of lines.
    Regards
    srikanth

Maybe you are looking for

  • How to get multiple row values in one text box while clicking one row from grid?

    hi friends,            i am working on flex4 web application i am using  one datagrid ,it have two records(bills),one button and one text box. ex: customername      salesrepname   receipt no      amount venkat                         raj             

  • Data recovery from failed HDD in my 2.16 Core 2 Duo black case?

    I have a question mark upon startup and the OS never launches, and I tried using a new 10.6 DVD to install the OS again and use the utilities on the DVD. I quickly saw there was no recognition of the HDD. I ordered and am installing a new 320GB 7200

  • Can we send an FOP generated PDF by email in PL/SQL code?

    Hi All, I have the FOP PDF generation of a report. We can "Save As" to the hard drive and then manually email it to someone by attaching it to the email.. normal.. Can we click a button on the report, save the report as PDF and send it through htmldb

  • Best practice of getting request parameters in JSP page

    int period_Id = 0; try period_Id = Integer.parseInt(request.getParameter("period_id")); catch(Exception e)   period_Id = 0; }This is the normal way we use to get parameters from previous page. But I am not sure if it is thebest practice. Please respo

  • Facebook Issue 12-20-2012​: Facebook App Returns Error Codes 2001 - 3799

    Currently the Facebook application for BlackBerry is experiencing a problem where the application returns an Error Code 2001 through 3799.  This issue is currently being looked into and hopefully a resolution will be found soon.  Until then, here is