Function code in the reports

depends on the parameters related with group, I want to get a different total amount;
the following code does work in oracle reports but too long code. I want to improve the function as simple using Loop statement. would you help me?
function CF_9Formula return Number is
A NUMBER;
B NUMBER;
c NUMBER;
begin
A := :Sum of a group;
B := :Sum of b group;
C := :Sum of b group;
if (:P_1 = '0' ) then
     RETURN NVL(0,0)+NVL(B,0)+NVL(C.0);
elsif (:P_2='0') then
RETURN NVL(A,0)+NVL(0,0)+NVL(C.0);
elsif (:p_3='0') then
RETURN NVL(A,0)+NVL(B,0)+NVL(0,0);
elsif (:P_1 = '0' AND :P_2='0' ) then
RETURN NVL(0,0)+NVL(0,0)+NVL(C,0);
elsif (:P_1 = '0' AND :P_3='0' ) then
RETURN NVL(0,0)+NVL(B,0)+NVL(0,0);
elsif (:P_2 = '0' AND :P_3='0' ) then
RETURN NVL(A,0)+NVL(0,0)+NVL(0,0);
elsif (:P_1 = '0' AND :P_2='0'AND :P_3='0' ) then
RETURN NVL(0,0)+NVL(0,0)+NVL(C,0);
else
RETURN NVL(A,0)+NVL(B,0)+NVL(C,0);
END IF;
END;

Whats the value for P_1, P_2 or P_3 if its not '0'. If its '1' you could do a:
RETURN :P_1*NVL(A,0)+:P_2*NVL(B,0)+:P_3*NVL(C,0);

Similar Messages

  • Satndard AVL function code in interactive reports

    hai
    can any one give some frequently used alv function codes for interctie display
    thanking u
    regards
    murali

    Hi Murali,
    please find the attached code. hope it helps you....
    report  zptest_alv1.
    **TABLES DECLN
    tables: vbrk,vbrp,t001.
    type-pools: slis.
    type-pools: icon.
    ***DATA DECLN.
    data: v_vbeln like vbrk-vbeln,
          v_matnr like vbrp-matnr.
    constants: c_user_command type slis_formname value 'F_USER_COMMAND',
               c_pf_status type slis_formname value 'F_SET_PF_STATUS'.
    **ALV RELATED TABLES.
    *--Field Catalog
    data:   it_fieldcat type standard table of
                            slis_fieldcat_alv  with header line,
            it_fieldcat1 type standard table of
                            slis_fieldcat_alv with header line ,
            wa_fieldcat type slis_fieldcat_alv,
    *--Layout
           wa_layout type slis_layout_alv,
    *--Sort
           it_sort type slis_t_sortinfo_alv,
           wa_sort type slis_sortinfo_alv  ,
    **-Structure for excluding function codes
           wa_extab type slis_extab,
    **-To hold function codes to be excluded in ALV toolbar
           it_extab type slis_t_extab.
    ***INTERNAL TABLE DECLN.
    data: begin of it_vbrk occurs 0,
          vbeln like vbrk-vbeln,
          waerk like vbrk-waerk,
          vkorg like vbrk-vkorg,
          fkdat like vbrk-fkdat,
          bukrs like vbrk-bukrs,
          netwr like vbrk-netwr,
          end of it_vbrk.
    data: begin of itab occurs 0,
          vbeln like vbrp-vbeln,
          posnr like vbrp-posnr,
          fkimg like vbrp-fkimg,
          vrkme like vbrp-vrkme,
          netwr like vbrp-netwr,
          matnr like vbrp-matnr,
          arktx like vbrp-arktx,
          end of itab.
    data: it_vbrp like itab occurs 0 with header line.
    ***selection screen.
    selection-screen: begin of block b1 with frame title text-001.
    select-options: s_vbeln for vbrk-vbeln,
                  s_fkdat for vbrk-fkdat obligatory,
                    s_matnr for vbrp-matnr.
    selection-screen: end of block b1.
    **INITIALIZATION.
    initialization.
      s_fkdat-low = sy-datum - 200.
      s_fkdat-high = sy-datum.
      append s_fkdat.
    ***AT SELECTION-SCREEN.
    at selection-screen.
      if not s_vbeln is initial.
        select single vbeln from vbrk
               into v_vbeln
               where vbeln in s_vbeln.
        if sy-subrc <> 0.
          message e001(zz2).
        endif.
      endif.
      if not s_matnr is initial.
        select single matnr from mara
               into v_matnr
               where matnr in s_matnr.
        if sy-subrc <> 0.
          message e001(zz2).
        endif.
      endif.
    ***START-OF-SELECTION.
    start-of-selection.
      perform get_data_vbrk.
      perform get_data_vbrp.
    ***END-OF-SELECTION.
    end-of-selection.
    *--Sort the Output Fields
    perform sort_fields.
    *--Build Field catalog for the Output fields
      perform get_field_catalog.
    ***MODIFY LAYOUT.
    perform modify_layout.
    *--Display ALV output
      perform list_disp  tables it_vbrk
                               using  c_user_command.
    *&      Form  GET_DATA_VBRK
          text
    -->  p1        text
    <--  p2        text
    form get_data_vbrk.
      select vbeln
             waerk
             vkorg
             fkdat
             bukrs
             netwr
             into table it_vbrk
             from vbrk
             where vbeln in s_vbeln
             and fkdat in s_fkdat.
    endform.                    " GET_DATA
    *&      Form  GET_DATA_VBRP
          text
    -->  p1        text
    <--  p2        text
    form get_data_vbrp .
    SELECT VBELN
            POSNR
            FKIMG
            VRKME
            NETWR
            MATNR
            ARKTX
            FROM VBRP
            INTO TABLE IT_VBRP
            FOR ALL ENTRIES IN IT_VBRK
            WHERE VBELN = IT_VBRK-VBELN.
      select vbeln
             posnr
             fkimg
             vrkme
             netwr
             matnr
             arktx
             from vbrp
             into table itab
             for all entries in it_vbrk
             where vbeln = it_vbrk-vbeln.
    endform.                    " GET_DATA_VBRP
    *&      Form  GET_FIELD_CATALOG
          text
    -->  p1        text
    <--  p2        text
    form get_field_catalog .
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
        exporting
          i_program_name         = sy-repid
          i_internal_tabname     = 'IT_VBRK'
          i_inclname             = sy-repid
        changing
          ct_fieldcat            = it_fieldcat[]
        exceptions
          inconsistent_interface = 1
          program_error          = 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.
    endform.                    " GET_FIELD_CATALOG
    *&      Form  SORT_FIELDS
          text
    -->  p1        text
    <--  p2        text
    form sort_fields .
      clear wa_sort.
      wa_sort-spos = '01'.
      wa_sort-fieldname = 'VBELN' .
      wa_sort-tabname   = 'IT_VBRK'.
      wa_sort-up        = 'X'.
      append wa_sort to it_sort.
      clear  wa_sort.
      wa_sort-spos = '02'.
      wa_sort-fieldname = 'POSNR' .
      wa_sort-tabname   = 'IT_VBRP'.
      wa_sort-up        = 'X'.
      append wa_sort to it_sort.
    endform.                    " SORT_FIELDS
    *&      Form  MODIFY_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    form modify_layout .
      wa_layout-default_item = 'X'.
      wa_layout-zebra = 'X'.
      wa_layout-expand_fieldname = 'EXPAND'.
      wa_layout-colwidth_optimize = 'X'.
    endform.                    " MODIFY_LAYOUT
    *&      Form  LIST_DISP
          text
    -->  p1        text
    <--  p2        text
    form list_disp  tables   p_it_vbrk
                       using    p_user_command type slis_formname.
    *CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM       = SY-REPID
         I_CALLBACK_PF_STATUS_SET = 'POPUP'
         I_CALLBACK_USER_COMMAND  = 'HANDLE_USER_COMMAND'
         IS_LAYOUT                = WA_LAYOUT
         IT_FIELDCAT              = IT_FIELDCAT[]
         IT_EXCLUDING             = IT_EXTAB[]
       TABLES
         T_OUTTAB                 = IT_VBRK
       EXCEPTIONS
         PROGRAM_ERROR            = 1
         OTHERS                   = 2.
    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 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'POPUP'
          i_callback_user_command  = 'HANDLE_USER_COMMAND'
          is_layout                = wa_layout
          it_fieldcat              = it_fieldcat[]
        tables
          t_outtab                 = p_it_vbrk
        exceptions
          program_error            = 1
          others                   = 2.
    endform.                    " LIST_DISP
    *&      Form  POPUP
          text
         -->P_EXTAB    text
    form popup using it_extab type slis_t_extab.
    *- Pf status
      set pf-status 'POPUP'.
    endform.                 " POPUP
    *&      Form F_USER_COMMAND
    form handle_user_command using r_ucomm     like sy-ucomm
                                   rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
            clear it_fieldcat1[].
            clear it_vbrp[].
            if rs_selfield-fieldname = 'VBELN'.
            read table it_vbrk index rs_selfield-tabindex.
            loop at itab where vbeln = it_vbrk-vbeln.
            move-corresponding itab to it_vbrp.
            append it_vbrp.
            endloop.
            perform interactive_report.
            endif.
      endcase.
    endform.                    "HANDLE_USER_COMMAND
    *&      Form  INTERACTIVE_REPORT
          text
    -->  p1        text
    <--  p2        text
    form interactive_report .
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME         = SY-REPID
         I_INTERNAL_TABNAME     = 'ITAB'
         I_INCLNAME             = SY-REPID
       CHANGING
         CT_FIELDCAT            = IT_FIELDCAT1[]
       EXCEPTIONS
         INCONSISTENT_INTERFACE = 1
         PROGRAM_ERROR          = 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.
      wa_fieldcat-fieldname = 'VBELN'.
      wa_fieldcat-seltext_l = 'BILLING DOC'.
      wa_fieldcat-tabname = 'IT_VBRP'.
      wa_fieldcat-col_pos  = 1.
      append wa_fieldcat to it_fieldcat1.
      clear wa_fieldcat.
      wa_fieldcat-fieldname = 'POSNR'.
      wa_fieldcat-seltext_l = 'ITEM'.
      wa_fieldcat-tabname = 'IT_VBRP'.
      wa_fieldcat-col_pos  = 2.
      append wa_fieldcat to it_fieldcat1.
      clear wa_fieldcat.
      wa_fieldcat-fieldname = 'FKIMG'.
      wa_fieldcat-seltext_m = 'INV QTY'.
      wa_fieldcat-tabname = 'IT_VBRP'.
      wa_fieldcat-col_pos  = 3.
      append wa_fieldcat to it_fieldcat1.
      clear wa_fieldcat.
      wa_fieldcat-fieldname = 'VRKME'.
      wa_fieldcat-seltext_m = 'SALES UNIT'.
      wa_fieldcat-tabname = 'IT_VBRP'.
      wa_fieldcat-col_pos  = 4.
      append wa_fieldcat to it_fieldcat1.
      clear wa_fieldcat.
      wa_fieldcat-fieldname = 'NETWR'.
      wa_fieldcat-seltext_m = 'NET PRICE'.
      wa_fieldcat-tabname = 'IT_VBRP'.
      wa_fieldcat-do_sum = 'X'.
      wa_fieldcat-col_pos  = 5.
      append wa_fieldcat to it_fieldcat1.
      clear wa_fieldcat.
      wa_fieldcat-fieldname = 'MATNR'.
      wa_fieldcat-seltext_m = 'MATERIAL'.
      wa_fieldcat-tabname = 'IT_VBRP'.
      wa_fieldcat-col_pos  = 6.
      append wa_fieldcat to it_fieldcat1.
      clear wa_fieldcat.
      wa_fieldcat-fieldname = 'ARKTX'.
      wa_fieldcat-seltext_m = 'SALES ORDER'.
      wa_fieldcat-tabname = 'IT_VBRP'.
      wa_fieldcat-col_pos  = 7.
      append wa_fieldcat to it_fieldcat1.
      clear wa_fieldcat.
    *CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM       = SY-REPID
         IS_LAYOUT                = WA_LAYOUT
         IT_FIELDCAT              = IT_FIELDCAT1[]
         IT_SORT                  = IT_SORT
       TABLES
         T_OUTTAB                 = IT_VBRP
       EXCEPTIONS
         PROGRAM_ERROR            = 1
         OTHERS                   = 2.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = sy-repid
          is_layout          = wa_layout
          it_fieldcat        = it_fieldcat1[]
        tables
          t_outtab           = it_vbrp
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " INTERACTIVE_REPORT
    Madhavi

  • How to trap the two function code in the bdc

    Dear All,
    I have a bdc program now i need to pick up function code based on some condition. means if some condition then goto one function code and else don't go. I tried it but not working. It is working in shdb but not in the program.
    eg.
        if not zcontract_no is initial.
           perform bdc_dynpro using 'SAPMZW_CREATE_SALES_ORDER_STD'
                                    '9000'.
           perform bdc_field using 'BDC_CURSOR'
                                        'P_CONTRACT'.
            perform bdc_field using 'BDC_OKCODE'
                                    <b>'=COPY'.</b>
          endif.
    perform bdc_field using 'BDC_OKCODE'
                                    <b>'=SUBMIT'</b>.
    Please suggest.
    Regds,
    Anup

    Hi ,
        In your second case u r not specifying the BDC DYNPRO screen number , your code should be
    if not zcontract_no is initial.
    perform bdc_field using 'BDC_OKCODE'
    '=COPY'.
    else..
    perform bdc_field using 'BDC_OKCODE'
    '=SUBMIT'.
    endif.
    Kunal

  • How to assign t-code to the report painter

    Dear expert,
    Would like to seek for advice for the step to assign the T-code to report painter.
    Kindly advise.
    Thank you.
    Regards,
    Karen
    Moderator: Please, search SDN

    Hi
    1. Create the transaction code,say, ZF01_TCODE from Se93
    2. Choose "Transaction with parameters".. Press enter
    3. Enter START_REPORT in the Transaction field and press Enter
    4. Select the Skip initial screen and Inherit GUI attributes check boxes
    5. On the same screen, scroll down to the Default Values table and select parameters D_SREPOVARI-REPORTTYPE and
    D_SREPOVARI-REPORT.
    6. Enter RW for the report type and your report group ZCC8 as the report value
    7. Now you can save your transaction and transport it to other systems
    Regards
    Ajay M

  • Assigning a T-code to the report created under transaction code (SQVI)

    Dear Gurus,
    I have joined three tables in t-code SQVI and created the report after assigning the required fields in list or selected views.
    Now I want to assign this report to a particular T-code, so that any user can access the same report without creating it in SQVI again.
    Kindly let me know how can I assign the T-code to this Report.
    Thanks,
    Abhishek

    Follow the following steps:
    1. Make a transaction with parameters transaction from se93 .
    2. Put START_REPORT in the transaction
    3. Check the skip intial screen checkbox
    4. in the table control in the end of screen put these values
    D_SREPOVARI-REPORTTYPE = AQ
    D_SREPOVARI-REPORT = <USER GROUP in WHICH THE QUERY IS CREATED> G
    (G stands for GLOBAL AREA:)(Entered after a space)(G should come after 9 chanracters(8 char for user group,one space and then G)
    D_SREPOVARI-EXTDREPORT = <QUERY NAME>
    Thanks & regards
    J Prakash

  • To have "Right Click" functionality enabled on the reports through BO SDK

    Hi,
    Is it possible to have pop up on the HTML output screen, e.g If I write click on the final HTML report, i get a pop up where I can select different options, say saving a report in PDF, Excel, etc.
    The Alternate could be to provide tab on the frames, But the requirement says to have a pop up feature on the HTML output.
    Thanks in Advance.
    Shruti

    The DHTML viewers for documents - Crystal Reports, Web Intelligence or Desktop Intelligence - have toolbars with export functionality.
    Sincerely,
    Ted Ueda

  • Error ITS_TEMPLATE_NOT_FOUND when calling a function code from the web

    Hi Experts,
    I have craeted a simple module pool program and a service for the same in SICF. The module pool has only one screen where I am giving the input to the two fieds
    1. year  2. category. when I click on FIND button the result will appear on the same screen. The result will be the winner and the nominees for that year. The program is running perfect when I execute the transaction in R/3.
    The coding in the PAI of the module pool is as follows:
    *& Module Pool       ZYMOVIE1
    INCLUDE ZYMOVIE1TOP                             .    " global Data
    INCLUDE ZYMOVIE1O01                             .  " PBO-Modules
    INCLUDE ZYMOVIE1I01                             .  " PAI-Modules
    INCLUDE ZYMOVIE1F01                             .  " FORM-Routines
    tables : ymovie.
    DATA:     OKCODE like sy-ucomm.
    tables: ztext.
    *&      Module  GET_RECORD  INPUT
          text
    MODULE GET_RECORD INPUT.
    case okcode.
    when 'FIND'.
    SELECT SINGLE * FROM YMOVIE
                   WHERE YYEAR      = YMOVIE-YYEAR
                         AND CATEGORY     = YMOVIE-CATEGORY.
    endcase.
    ENDMODULE.                 " GET_RECORD  INPUT
    I have created a Internet service ZYMOVIE1 ans created a template for screen 9000
    The HTML code is as follows:
    `include(~service="bbpglobal", ~name="bbpfunctions.html")`
    <html>
      <head>
    <title>`~windowtitle`</title>
      </head>
      <body>
    `~messageline`
    <form name="formFind" action=&#8221;`wgateUrl()`&#8221; method="POST">
       year : <input type = "text" name = "`YMOVIE-YYEAR`"/>
       category : <input type = "text" name = "`YMOVIE-CATEGORY`"/>
    <INPUT TYPE="hidden" name="~okcode" value="FIND">
    <INPUT TYPE="submit" name="btnSubmit" value="FIND">
    <input type = "text" name = "YMOVIE-WINNER" value= "`YMOVIE-WINNER`" size = "`YMOVIE-WINNER.maxsize`"/>
    <input type = "text" name = "YMOVIE-NOMINEE1" value= "`YMOVIE-NOMINEE1`" size = "`YMOVIE-NOMINEE1.maxsize`"/>
    <input type = "text" name = "YMOVIE-NOMINEE2" value= "`YMOVIE-NOMINEE2`" size = "`YMOVIE-NOMINEE2.maxsize`"/>
    <input type = "text" name = "YMOVIE-NOMINEE3" value= "`YMOVIE-NOMINEE3`" size = "`YMOVIE-NOMINEE3.maxsize`"/>
    </form>
      </body>
    </html>
    when i click on the FIND button in the web I am getting a dump "ITS_TEMPLATE_NOT_FOUND".
    Please suggest me where I am doing wrong. Also is there any way i can add attachemtns in SDN. It is very difficult to write everything here and how to use the "code" button when i create a new thread in SDN?/
    thanks
    sankar

    hi
    yes i got some entries in SM50 with w at the left
    A  Error Code ITS_TEMPLATE_NOT_FOUND.
    W      *** ERROR => diag: Template for modulepool ZYMOVIE1, dynpro number 9000, service zymovie1 is not found and GenerateDynpro fla
    W      *** ERROR => plugin: XKrnHandleResponse failed rc= -25 [itspxkrn.cpp 764]
    W      *** ERROR => plugin: ItspXKrn_HandleResponse failed. 0x2b96feff78 rc: 0 [itspxkrn.cpp 391]
    W    *** ERROR => ipl_ConvertOut failed rc = 1, send icf error page [itsplxx.c    1551]
    let me know if you need any other information
    thanks
    sankar

  • How to find function codes of the buttons in ABAP Webdynpro

    I had 2 buttons in my input screen of the WebDynpro, for both buttons some piece of logic is common. So i wrote that common logic in the default method 'WDDOBEFOREACTION', which will be triggered always before the corresponding methods got triggered.
    Now my problem is the method 'WDDOBEFOREACTION' triggering even when user hits ENTER in the input screen, to prevent the common logic not to execute need to write some condition based on the user action. But unfortunately was not able to find the way. Could any one suggest me on this.

    For your specific requirement :
    you should first determine the current action which triggered this WDDOBEFOREACTION method,
    as this method triggers for every action performed on the webdynpro view.
    For that below is the code
      DATA lo_api_view_controller    TYPE REF TO if_wd_view_controller.
      DATA lo_action                 TYPE REF TO if_wd_action.
      lo_api_view_controller = wd_this->wd_get_api( ).
      lo_action = lo_api_view_controller->get_current_action( ).
      IF lo_action IS NOT BOUND.
              IF lo_action->name EQ 'BUTTON1'   OR   lo_action->name EQ 'BUTTON2'.
    Where BUTTON1 and BUTTON2 are the actions associated with both the buttons.
    Write your common logic here and now it would get executed only for both these button cliks only
               ENDIF.
    ENDIF.
    Edited by: Avasarala Sampath on Oct 28, 2011 7:26 AM
    Edited by: Avasarala Sampath on Oct 28, 2011 7:29 AM

  • What is the functional scope of the report MILL_IBASE?

    Hello,
    We're working for a cable manufacturing company and we came across a possible problem. We've discovered recently some double classifications in our system.
    Could we use this report MILL_IBASE to retrieve all double classifications found in our system? And if so what report can use then to delete those duplicates?
    Thanks,
    Andrei

    sshruti_remo wrote:
    Isnt there anyone who can answer my question?Hey dude! we are here..
    Actually JavaFX had very good in future.
    Javafx has more RIA and developers would feel very easy to learn this script.
    Many development works are being going on by JAVAFX team.
    It's your choice to know which one would be suitable for your application development.As a developer you need to get knowledge of every thing and updates too.
    I don't say that specific programming language/scripting is best. Every languages are best on their own field. JavaFx can be good choice for the beginner developer and
    has good knowledge of Design. This scripting language has different coding pattern than others.
    The JavaFX now has very good performance and startup time than ever as this scripting language is just new ,
    JavaFX has many advantages which isn't available at other like: draggable applet, easier to cope with mobile, TV, desktop. Futher more javafx can be bind with Java.
    I think there would be great hope of JavaFX on world as this good advantage : can be deployed for mobile,TV,Desktop easily and it's secure too than Flash.
    I really appreciate that there would be great development of Javafx in future.
    Sorry for my non standard english!
    Thanks.

  • Deactivating function code of pf-status

    experts,
    how to deactivate a function code in the report when the report consists of a pf-status.
    what is the default pf-status for a report

    1) Deactivating f_code for status:
    SET PF-STATUS your_status EXCLUDING f_code.
    2) If you want to get standard status use:
    SET PF-STATUS space.
    Alternatively go to SE41-> write program name -> choose your status ->
    from menu choose Extras->Adjust Template-> choose List Status.
    System will activate any necessary functions for you:)
    You can choose other templates i.e. for LIST VIEWER (ALV) or TREE STATUS.
    Pls reward if helpfull.
    Best Regards,
    Marcin

  • How do I convert the following code from crystal reports to Reporting Services?

    stringvar rbt := "";
    if { param} = -1 then rbt := "ALL | " else rbt := {rptStoreMasterByDC;1.RegionName} + " | ";
    if {param2} = -1 then rbt := rbt + "ALL | " else rbt := rbt + {rptStoreMasterByDC;1.BranchName} + " | ";
    if {param3} = -1 then rbt := rbt + "ALL" else rbt := {rptStoreMasterByDC;1.TerritoryName};
    rbt

    Add a customer code in the report. Call it from the report tablix cell using expression. Pass param,param2,param3, RegionName, BranchName, TerritoryName as parameters of the custom function/procedure.
    Refer http://technet.microsoft.com/en-us/library/ms156028.aspx
    The custom code will look like as below.
    Public Function ChangeWord(ByVal param As Integer,ByVal param2 As Integer,ByVal param3 As Integer,ByVal RegionName As String,ByVal BranchName As String,ByVal param As Territory) As String
    Dim s as string
    If param = -1 then s = "ALL |" else s = RegionName & "|"
    If param2 = -1 then s = s & "ALL |" else s = BranchName & "|"
    If param3 = -1 then s = s & "ALL" else s = TerritoryName
    Return s
    End Function
    Regards, RSingh

  • Handling new function code in customised gui status of report

    I have a very simple report, YRPT1, which write a few lines to the list. I have created a new gui status and set it in my report. In se41, I also added a new function code 'TERM' in the application toolbar. If I am not wrong, i need to handle this new function code in the PAI section of the simple report. So my question is, where is the PAI section of this simple report?

    In selection screen, the user action is to be handler in
    "AT SELECTION-SCREEN" event.
    Code should be like this
    tables sscrfields.
    at selection-screen.
    case sccrfields-ucomm.
    endcase.

  • How to change the Partner function code in Quotation

    Hi All,
    We have a requirement that whenever a Quote is cancelled,
    We need to change one of the function codes in the partner tab and also the user status should be changed.
    Can anyone give a quick solution on this?
    Your response will be appreciated.
    Thanks in advance.
    Regards,
    Ramya

    You will best implement this as an action (tx. SPPFCADM), which is called on changing the status to cancelled. In this action you can call a function module changing the partner functions using e.g. CRM_ORDER_MAINTAIN as the appropriate function module.
    Regards, Kai

  • How to maintain the function code added to a custom screen in IW31

    Hello gurus,
    Does anyone know how can I maintain the function code of the push button I have in my enhancement screen in IW31 (Service Order). 'Coz it says "Requested function 'my fcode' is not available". I tried it in VFBS but don't know the screen sequence or what's the right data to put. Please help me with this. Thanks.
    Regards,
    AyemSheera

    Hi, you need add Your Function Code into the Tables T185x (x like T, F...). Call Transaction SM30 (SM31), put the Table name T185 into Table name and select the Button 'Maintain' or Customizing. The Transaction will navigate you to right position in Customizing. Next, you need to find in the Table's T185x Line with the Program Name SAPLCOIH. Then add your code into the Table's. At next, You have to maintain Your function Code in the PAI module of your Custom screen in the TA IW31.
    Sincerely Yours,
    Lubomir.

  • How to get the function codes

    Hi ,
    For displaying ALV on a modal dialog screen, I am using "CL_GUI_ALV_GRID" and the method is SET_TABLE_FOR_FIRST_DISPLAY.
    I want to exclude the complete tool bar that is appearing on the screen. For that I have an exporting parameter of the above mentioned method, i.e., "IT_TOOLBAR_EXCLUDING"
    But I dont know the function codes of the tool bar elements, to fill the internal table with. Couls any one please help me how to find them out.

    In the ALV Layout mark NO_TOOLBAR = 'X'
    data: e_layout TYPE LVC_S_LAYO.
    MOVE 'X' TO e_layout-no_toolbar.
    Pass e_layout to IS_LAYOUT of SET_TABLE_FOR_FIRST_DISPLAY
    Edited by: Swastik Bharati on Apr 22, 2009 3:24 PM

Maybe you are looking for

  • To pass perner in Function Module

    Dear All, I have a requirement where I have to send a mail to the new hired employee at the time of creation of IT0105- subtype 0010(email-ID) I have wriiten a code for this IT                  STYP             Feild                                 F

  • Installing iTunes on Windows Home Server.

    I've installed iTunes on my Windows Home Server and connected it to my AppleTV. To have it running 24/7 I need to log onto WHS run iTunes then exit without logging off. Is there any way to run iTunes as a Windows SERVICE ? Mark

  • Safari won't refresh updated page

    Altho' Explorer shows an updated page that I posted today, the same URL continues to show the former page in Safari. I emptied the Cache, Reset Safari and rebooted the computer but the same older page still shows up. Another page that I updated earli

  • Diaporama for 16/10 screen

    When making a diaporama with my 16/10 sceen notebok and photoschop elements, it seems as if the sise of dias was limited to a 4/3 sceeen size. Is it possible to make 16/10 diporamas ?

  • Cannot access deployed JDeveloper App in Weblogic Server

    I have built and successfully deployed an Oracle JDeveloper 11.1.2.2.0 web application using ADF security to a clustered (two servers) Weblogic 10.3.5.0 server. The login page comes up when I type in the URL but upon submitting the login page I get t