Please:How to repeat the return values multiple times in sapscript

Currently my subroutine is returning a value called TOQBSSHB single time and i am working with standard layout called RFFOUS_C.Please can anybody tell me if i want to show multiple times TOQBSSHB for different values of VBLNR .Is it possible if it is what are changes i should make on layout and subroutine.
PERFORM EXTRACT IN PROGRAM Y_MIT_TEST2
USING &REGUH-VBLNR&
USING &REGUH-NAME1&
CHANGING&TOTQBSHB&
ENDPERFORM
FORM EXTRACT TABLES IN_PAR STRUCTURE ITCSY OUT_PAR STRUCTURE ITCSY.
TABLES : REGUP,BSEG,REGUH,REGUD.
  DATA : BILL_NO LIKE REGUH-VBLNR.
  DATA : ITAB LIKE REGUP OCCURS 0 WITH HEADER LINE.
  DATA : JTAB LIKE REGUP OCCURS 0 WITH HEADER LINE.
  DATA : BELNR1 LIKE ITAB-BELNR.
  DATA : QBSHB1 LIKE REGUD-SWNES.
  DATA : QBSHB2 LIKE REGUD-SWNES.
  DATA : TOTOQBSHB LIKE REGUD-SWNES.
  READ TABLE IN_PAR WITH KEY NAME = 'REGUH-VBLNR'.
  IF SY-SUBRC = 0.
   BILL_NO = IN_PAR-VALUE.
  ENDIF.
SELECT * FROM REGUP INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE VBLNR
= BILL_NO.
  READ TABLE ITAB INDEX 1.
  IF SY-SUBRC = 0.
  MOVE ITAB-QBSHB TO QBSHB1.
  MOVE ITAB-BELNR TO BELNR1.
  ENDIF.
SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE JTAB WHERE BELNR
= BELNR1.
  LOOP AT JTAB.
  READ TABLE JTAB INDEX SY-TABIX.
  IF SY-SUBRC = 0.
  QBSHB2 = QBSHB2 + JTAB-QBSHB.
  ENDIF.
  ENDLOOP.
  TOTOQBSHB = QBSHB1 + QBSHB2.
  READ TABLE OUT_PAR WITH KEY NAME = 'TOTQBSHB'.
  IF SY-SUBRC = 0.
  MOVE TOTOQBSHB TO OUT_PAR-VALUE.
  MODIFY OUT_PAR INDEX SY-TABIX.
  ENDIF.
ENDFORM.

I said :
- A) you should copy the main program without to copy
     includes, so when the systems ask you which objects
     you want to copy: check all excluding INCLUDES.
So you'll have a new program which uses the same includes of the standard program.
- B) in your z-program you find the point where you should insert your code: you'll have two cases:
- you should insert code in a point that is writen in z-program;
- you should insert code in a point (for example a form) that isn't write in z-program, but in a standard include your z-program use.
In first case you only write your code, in second one before you should copy the include, than insert it in your z-program and so insert your code in the include.
For example:
- A) Copy RFFOUS_C in ZRFFOUS_C
- B) I should change the code of routine  
     SCHECKDATEN_EINGABE, it's defined in RFFORI01, so I copy it in ZRFFORI01, insert my code in it.
- C) found where my z-program call include RFFORI01:
subroutines for check print and prenumbered checks                  *
  INCLUDE RFFORI01.
now replace this with the call to my new include:
  INCLUDE RFFORI01.
  INCLUDE ZRFFORI01.
If you do in this way you copy only includes where you should change the code.
Message was edited by: max bianchi
Message was edited by: max bianchi

Similar Messages

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • How to store the return value from a select list in page item ?

    I'm sorry, I'm sure you will all flame me for this (and its long too :-(. I'm still trying to pick this up and havn't had time to read manual and this forum and up against the clock (as usual), but this must be something thats simple to do, otherwise why have 2 cols on LOV (display text and return value.
    normal kind of thing - master /detail, a master table and a detail table, master.id is PK in master, master.name is the name of the master item. detail.id is pk in detail, detail.mid is foreign key to master.id. I have a tabular report that displays a join of cols from master and detail, with 2 cols being links, one is a link on master.name, that passes master.id to page P1 and it displays a row from master. The other col displays detail.name and passes detail.id to page P3, P3 displays a row of the detail table.
    I want to populate a LOV with possible master.name values, but display the name of the current P3_MID value (from detail.mid). Then a user can pick a different master and it needs to update P3_MID so on submit it updates the row.
    I just can't seem to see in the manual how you can specify where the return value on a LOV goes?
    As I said, sorry for long post and not having had time to read docs correctly - someone just point me at the subject matter somewhere, please.

    Sorry, I was trying to be to complex and obviously APEX is just too damn cleaver - I figured out how this works - basically APEX pulls the LOV and then matchs the mid to it to display the correct name - simple and easy - just me making it difficult

  • How to pass the return value?

    when i call another procedure in a different vi file(xxx.sql), how am i going to pass the return value that the end user key in?
    how to Promt the message and accept the value that keyed in?
    Please help...
    this is urgent!
    Thank you.

    Use OUT paramter to pass values from called procedure.
    You can pass the values as IN / IN OUT / OUT
    parameters.
    For sample coding please mail
    null

  • How to get the return value of a LOV item using javascript

    Hello,
    I am trying to put an onchange attribute in the HTML Form Element Attributes field of a LOV item. The javascript should access the new return value of the item. How is this done ? All the methods I have tried give only the display value, not the return value. For example $v() returns the display value.
    Tiina

    If your item is called P1_ITEM this will give you the return value of a popup (displays description,returns key value)
    alert($x('P1_ITEM_HIDDENVALUE').value)
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to Access the Return Value of a Function

    Hi,
    How do I access the return value when calling an Oracle function from .NET using Oracle.DataAccess.Client? The function returns an integer of 0, 1 or 99.
    Dim db_command_oracle As New OracleCommand()
    db_command_oracle.Connection = db_connection_oracle
    db_command_oracle.CommandType = CommandType.StoredProcedure
    db_command_oracle.CommandText = "swsarsi.import_appointments"
    Dim ret_value As New OracleParameter()
    ret_value.OracleDbType = OracleDbType.Int32
    ret_value.Direction = ParameterDirection.ReturnValue
    ret_value.Size = 2
    ret_value.OracleDbType = OracleDbType.Int32
    db_command_oracle.Parameters.Add(ret_value)
    Dim IN_student_id As New OracleParameter()
    IN_student_id.OracleDbType = OracleDbType.Varchar2
    IN_student_id.Direction = ParameterDirection.Input
    IN_student_id.Size = 10
    IN_student_id.Value = student_id
    db_command_oracle.Parameters.Add(IN_student_id)
    db_command_oracle.ExecuteNonQuery()
    messagebox.show(ret_value) ?????

    Your ODP.NET code looks correct. What error are you seeing?
    One thing that will definitely generate an error is that .NET message boxes require that strings be displayed. ret_value is a parameter object. You need to access its value and convert it to a string. At a minimum, you need to change that.

  • How to Change the return value for the parameters

    Hi, Can anyone help me with my problem?
    I have a parameter called "P1_Projects" defined in the HTMLDB page, on the report region, there are 2 buttons, one is "Go" button to submit the report on the screen, so user can preview the report, then another button "Export to PDF" can be clicked to generate the report using Oracle Report Services. The "Export to PDF" button will use the same set of parameters submitted for the "Go" button.
    So, the parameter "P1_Projects" is being used by these 2 buttons. and I have to pass a "%" wild card for "All Projects". To make the "Export to PDF" button work, I have to safe encode the return value for "%" to "%25" in order to pass the URL formula, but now my "Go" button doesn't work with "%25", it only recognize the "%" wild card.
    Is there a way to conditionally change the value depends which button is clicked?
    Any hint or help is highly appreciated!
    Hong

    try creating a plsql process which sets the P1_Projects item as required.
    in the plsql you can do:
    if :REQUEST = 'GO' then
    xxx
    else
    xxxx
    end if;
    set the condition to plsql expression:
    :REQUEST in ('GO', 'EXPORT')
    NB. the request value is usually set to the button name when a page is submitted from a button

  • How to set the returned value of CFL in a matrix

    dear all,
    I got a matrix binded to a DataSource and two CFLs are in this matrix. The codes for handling AfterChooseFromList is as following.  It works almost fine. But when a docoment containing more than two
    rows in the matrix and I reselect the CFL cell values more than two times, an error occured sometimes, not everytime. The error message is "This entry already exists in the following tables @CYW_PRROW [Message 131-183]"
    I have tried to find out what kind of situation to cause this error, but still in the mud.
    Can anybody give me some suggestion? Thanks.
    Public Sub OnAfterChooseFromList_Matrix(ByVal pVal As SAPbouiCOM.ItemEvent)
            Dim ActionSuccess As Boolean = pVal.ActionSuccess
            Dim oform As SAPbouiCOM.Form = SBO_Application.Forms.Item(pVal.FormUID)
            Dim oitem As SAPbouiCOM.Item = oform.Items.Item("mtx_0")
            Dim omatrix As SAPbouiCOM.Matrix = CType(oitem.Specific, SAPbouiCOM.Matrix)
            Dim oDataTable As SAPbouiCOM.DataTable
            oDataTable = pVal.SelectedObjects
            Dim val As String
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
            omatrix.GetLineData(pVal.Row)
            oform.DataSources.DBDataSources.Item("@CYW_PRROW").Offset = pVal.Row - 1
            If pVal.ColUID = "col_0" Then
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRItemCode", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            Else
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRSupp", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            End If
            omatrix.SetLineData(pVal.Row)
            If pVal.FormMode = "1" Then
                oform.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
            End If
        End Sub
    Another quesion, can I assign the returned value of CLF directly to the cell?

    Hello  Chao-Yi Wu,
    I don't have a real solution for you - just a few comments:
    1. At
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    I would add
            Try
                if oDataTable Is Nothing Then Exit Sub ' If the User cancels the CFL
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    2. At
       If pVal.ColUID = "col_0" Then
    I would make the branch by the pVal.ChooseFromListUID instead of the ColUID
    and the 2nd not with "Else" but with "Else If ....."
    3. It may work with EditText.String/Value of a cell but I never do that because of performance-reasons.
    I always do it the same way as you in principle - I don't really know what the problem is.
    4. Maybe some unique indexes on your table (although this should give an error at the update and not at CFL when "the unique-law is broken"...)?
    Sorry - that's all for the moment.
    Cheers,
    Roland

  • How to get the return value of a method

    hi there
    here is the code i write a method
    public void time(int x,int y){
    int xx;
    int yy;
    xx++;
    yy++;
    x=xx;
    y=yy;
    i want to use the return value of x and y at another place,who can tell if it is possible. thank u very much

    You declare the return type of the method, and then use the return keyword to return a value which you can assign to a variable.
    As the other respondent said, you cannot return more than one value from a function. If you need to return two related values, you may want to enclose them in a class and return an instance of that class. For instance:
    class TimeValue {
       final int x;
       final int y;
    public TimeValue(int x, int y) {
       this.x = x;
       this.y = y;
    }Then your method could create a new TimeValues and return it:
    public TimeValue time(int x,int y){
       int xx = x;
       int yy = y;
       ++xx;
       ++yy;
       return new TimeValue(xx, yy);
    }

  • How to catch the return value of ldap- bind?

    For net::ldap,
    my $ldap = Net::LDAP->new( .. );
    $ldap->bind($DN,$password);
    if the bind failed, what's the returned value for this?
    Many examples I read suggested "undef" is returned, but looks like it's not the case on Sun Solaris.
    Marg8

    somehow "undef" is not returned.
    for ldap->bind($DN,$password) or die "can't bind";
    it always continue no matter what DN or password you put in.
    So looks to me it returned something else.
    Marg8

  • How to display the return value of a function in a text field

    Hi,
    I have 2 textfields in a page.
    i> Empno
    ii> Salary
    The requirement is,
    i. Enter an Employee No.
    ii. On click of the 'SUBMIT' button a process would be executed which calls a function (or procedure with out parameter) which returns the Salary of the given Employee.
    iii. Need to display the salary to the 2nd textfield (Salary).
    Here is my process:
    i. If procedure call-- :P2_X is a page text field and out parameter.
    begin
    Pri_test_PROC(:P2_EMPNO,:P2_X);
    end;ii. If Function call --
    begin
    :P2_X:=Pri_test_PROC(:P2_EMPNO);
    end;
    Issue:
    The process is not getting executed and returning the process error message.
    Could anyone please give me a pointer, how to overcome the issue. Or if this is not the right way, then what is the work around.
    Regards
    Antara

    Antara,
    1. Clue about the error - yes, when I see the error message.
    2. What happens if you try to create a procedure like this:
    CREATE OR REPLACE PROCEDURE fetch_sal (in_emp IN NUMBER, out_sal OUT NUMBER)
    IS
    BEGIN
       FOR c IN (SELECT sal
                   FROM emp
                  WHERE empno = in_emp)
       LOOP
          out_sal := c.sal;
       END LOOP;
    END;and then run this in SQL Plus:
    DECLARE
       v_sal   VARCHAR2 (20);
    BEGIN
       fetch_sal (7839, v_sal);
       DBMS_OUTPUT.put_line (v_sal);
    END;What do you get displayed?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to read the return values of the API call

    Hi Friends,
    I am trying to access an image on DocumentMall and I am passing the following URL to login to DocumentMall in my ABAP program.
    https://beta-dmapi.documentmall.com/dmapi/login.do?account=NOBLEBETA&appid=39xxxxxxn&username=admin&password=pasxxxxx
    This will inturn return the Session ID as shown below.
    errorcode=0
    sessionid=ae820d5e-a0e9-4d50-ba3e-e2b41ffd3053
    Can you tell me how to capture the session ID in ABAP.
    thanks
    Krishna

    How are you calling it?  Using HTTP_CLIENT?  If so, use the methods of the response object to get the header or body fields.

  • Repeating the same region multiple times

    Hi,
    We have requirement where the same region gets repeated multiple times depending on the data.
    Functionally: QA -- Question Area , it has couple of questions
    Supplier1 has 1 QA assigned . Then in the page it gets displayed as
    - QA { ShowdetailHeader }
    -- Questions { tree table}
    Now that if Supplier1 is assigned with 3 QA's then
    - QA1
    -- Questions of QA1
    - QA2
    -- Questions of QA2
    - QA3
    -- Questions of QA3
    i.e the regions to be displayed will depend on the data.
    ================================
    To explain the same tech...
    We have the following requirement { Consider 2 VO's and a VL between them }. In the page we display it in this manner
    <showdetialHeader VO1>
    < Tree table VO2 >
    This region will be repeated depending on the result of VO1. That is say VO1 returns 3 rows then it should be displayed as
    <showdetialHeader VO1.row1>
    < Tree table VO2 [VO1.row1] >
    <showdetialHeader VO1.row2>
    < Tree table VO2 [VO1.row2]>
    <showdetialHeader VO1.row3>
    < Tree table VO2 [VO1.row3]>
    =========================================================
    Please guide me in I building this page.
    Thanks,
    Suresh.
    Edited by: user758041 on Dec 27, 2010 3:11 AM

    Hi,
    JDeveloper 11g does not yet support dynamical creation of ADF Region instances. So any attempt to create a region in an af:forEach or af:iterator loop wont work.
    Frank

  • How to control the opening form multiple times

    Greetings to all,
    I used Open_Form to open the form in my 'Menu.mmb'.
    My Question is:
    How we control the opening of a form from multiple times?
    Ex:
    In my menu.mmb I used OPEN_FORM.If we open the form,which was already opened ,I want to stop the form to open. How to do this?
    Thanks,
    Bhujendra

    pls try with
    FIND_FORM('EMPDETAILS1');
    OPEN_FORM('C:\INH\EMPDETAILS1');
    jeneesh                                                                                                                                                                                           

  • How to get the returned value from Functions with Callable statement?

    I was glad to find that stored procedures can be invoke with Java class code by the object of Callable statement like :
    String stmt = "BEGIN departments_pkg.do_select(?,?,?); END;";
    and getting the output variables by
    populateAttribute(DEPARTMENTNAME,st.getString(2),true,false);
    But i would like to get values returned from FUNCTION other than stored procedure, how can i achieve it? Thanks a lot!

    Here is  my code
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1202.
      MODULE subscreen_find.
      CALL SUBSCREEN SUBSEARCH INCLUDING sy-cprog dynnr.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_1202.
      CALL SUBSCREEN SUBSEARCH.
    MODULE subscreen_find.
      case sy-ucomm.
        when 'SELECTED'.             "fcode
          case 'ZSKILL_SEARCH'.     "data element
            when '01'.                       " value range
              dynnr = 0110.
            when '02'.
              dynnr = 0111.
          endcase.
      endcase.
    ENDMODULE.
    kindly tell me what is wrong
    Edited by: Raji Thomas on Feb 8, 2010 10:20 AM

Maybe you are looking for

  • Dynamic event registration only works for 2 inputs??

    Hello, I have written a routine that traverses for GObjects when the user runs the VI.  Based on some information contained within the label of the control, the routine puts a reference to the control in one of 4 arrays.  I dynamically register these

  • Html in JEditor pane (again)

    I know there are already loads of posts about this on the site (and I have hunted through them), but my problem is (I hope) different. I am trying to take an html string which was created by transforming some xml using xsl and setting it in a JEditor

  • Can't sync audio properly

    I KNOW it's something I'm not doing correctly so here goes. I'm trying to sync up bad quality audio with a good recording.When I move one layer of audio +00:00:00:01 to the left or right it's still not directly below the other audio file. Can you tel

  • USA ATV IN UK?

    Will an ATV2 bought in the USA work in UK? apart from plug connection (UL to BS), and change of output setting to PAL, will it work? Presumably, with the home connection set to USA via a VPN service, unique USA services could also be accessed? And by

  • Is the colour balance tool in Photoshop elements or just Photoshop?

    I'm doing a diploma in digital photography and I need to use a tool called Colour Balance which my course manual says is in Image>adjustments>Colour Balance.  I can't find this.  Is it somewhere else in Photoshop elements 8 or isn't it there altogeth