Expression.getFunctionWithArguments() adds additional empty argument...

Hi; I'm trying to use the Expression.getFunctionWithArguments() method to include the Oracle db function bitand() in a query. It seems that getFunctionWithArguments() always includes an extra ',' at the front of the argument list, here's an example of the SQL that is created;
SELECT t0.CLASS_NAME, t0.DESCRIPTION, t0.EDITABLE,
t0.ID, t0.DATE_MODIFIED, t0.DATE_CREATED, t0.MODIFIED_BY,
t0.ACL_ID, t0.NAME, t0.CREATED_BY, t0.TYPE_ID, t0.WKSP_ID,
t1.ID, t1.NAME
FROM XDOOBJECT t0, ALL_OBJECT_PRIVILEGES t2, ACL t1
WHERE (((t1.ID = t2.xdoobject_id)
AND ((t2.user_id = 'twatson2')
AND (bitand(, t2.privilege, 2) = 2)))
AND ((t1.ID = t0.ID)
AND (t0.CLASS_NAME = 'oracle.xdo.server.security.authorization.model.ACL')))
Notice the "AND (bitand(, t2.privilege, 2) = 2)))"
Here's my code that sets up this portion of the expression;
Expression exp1 = parentEb.getTable("ALL_OBJECT_PRIVILEGES")
.getField("xdoobject_id");
Expression exp2 = parentEb.getTable("ALL_OBJECT_PRIVILEGES")
.getField("user_id");
Expression exp3 = parentEb.getTable("ALL_OBJECT_PRIVILEGES").getField("privilege");
Vector args = new Vector();
args.add(exp3);
args.add(READ_PRIVILEGE_VALUE);
Expression exp4 = parentEb.getFunctionWithArguments("bitand",args).equal(READ_PRIVILEGE_VALUE);
Expression exp = parentEb.get("ID").equal(exp1)
.and(exp2.equal(userId).and(exp4));
I've tried adding additional arguments to the Vector just to see what it does and it always has the extra empty argument.
Thanks for you help with this.
-Tim Watson

Hi Tim,
It seems this method requires a base, which is t2.privilege in your case. You need to call getFunctionWithArguments() on the base. So your code should be something like:
Expression exp3 = parentEb.getTable("ALL_OBJECT_PRIVILEGES").getField("privilege");
Vector args = new Vector();
args.add(READ_PRIVILEGE_VALUE);
Expression exp4 = exp3.getFunctionWithArguments("bitand",args).equal(READ_PRIVILEGE_VALUE);
Shannon

Similar Messages

  • Additional Empty Spools

    Hello All,
    I have implemented the FM 'GET_PRINT_PARAMETERS' to obtain Multiple Spools for one Object (The total records fetched from the CDHDR ran into 9000000 and when all the records were written into SPool we received the system Message 'Spool I/O Error'). So, we implemented the Multiple Spool list concept and we were able to achieve it partially as for every Spool created there is an Additional Empty spool created with 0 records.
    select field1 field2 FROM CDHDR
              INTO TABLE IT_CDHDR PACKAGE SIZE 100000.
             IF P_SPOOL = 'X'. "Selection screen parameter
              IF SY-BATCH = 'X'.
                FLAG = 'CDHDR'."Used for TOP-OF-PAGE
                CNT = CNT + 1.
    CONCATENATE SY-REPID 'CDHDR' CNT SY-SYSID 'MK115' INTO
                                 TITLE1 SEPARATED BY SPACE.
    CONCATENATE 'CDHDR' CNT SY-SYSID 'MK115' INTO TITLE
                                        SEPARATED BY SPACE.
                CALL FUNCTION 'GET_PRINT_PARAMETERS'
                     EXPORTING
                          ARCHIVE_INFO           = 'FGL'
                          ARCHIVE_MODE           = '2'
                          ARCHIVE_TEXT           = TITLE1
                          AR_OBJECT              = DOC_TYPE
                          COPIES                 = 1
                          COVER_PAGE             = 'X'
                          DESTINATION            = 'LP01'
                          EXPIRATION             = '8'
                          IMMEDIATELY            = 'X'
                          LAYOUT                 = 'X_65_255'
                          LINE_COUNT             = 65
                          LINE_SIZE              = 255
                          LIST_NAME              = 'DOCUMENT'
                          LIST_TEXT              = TITLE
                          NEW_LIST_ID            = 'X'
                          NO_DIALOG              = 'X'
                          RELEASE                = ' '
                          REPORT                 = 'YARCHIV2'
                          SAP_COVER_PAGE         = 'D'
                          SAP_OBJECT             = 'DRAW'
                     IMPORTING
                          OUT_ARCHIVE_PARAMETERS = ARPARAMS
                          OUT_PARAMETERS         = PARAMS
                          VALID                  = VALID
                     EXCEPTIONS
                          ARCHIVE_INFO_NOT_FOUND = 1
                          INVALID_PRINT_PARAMS   = 2
                          INVALID_ARCHIVE_PARAMS = 3
                          VALID_MISSING          = 4
                          OUT_PARAMETERS_MISSING = 5
                          OTHERS                 = 6.
                IF VALID <> SPACE.
                  NEW-PAGE PRINT ON        <--Error Here?
                  PARAMETERS PARAMS
                  ARCHIVE PARAMETERS ARPARAMS
                  NEW-SECTION NO DIALOG.
                ENDIF.
                NEW-PAGE.    <--If this New page is commented
                             the First page does not have the
                             Header
                LOOP AT IT_CDHDR.
                  V_COUNT = V_COUNT + 1.
                write:/ it_cdhdr-field1,it_cdhdr-field2.
                  IF V_COUNT = 54.
                    WRITE:/ SY-ULINE(223).
                    NEW-PAGE.  <-- This creates the Header
                    V_COUNT = 0.
                  ENDIF.
                ENDLOOP.
                NEW-PAGE PRINT OFF.
                REFRESH IT_CDHDR.
                FREE  IT_CDHDR.
      if flag <> ' '.
        case flag.
          WHEN 'CDHDR'.
            WRITE:/ SY-ULINE(150).
    WRITE:/ SY-VLINE, 02 'CDHDR' COLOR COL_HEADING , 08 '--',
                      12 'Change document header'
                                  COLOR COL_HEADING,
                      150 SY-VLINE.
            WRITE:/ SY-ULINE(150).
            SKIP 1.
    Output -
    Spool# #ofPages  Text
    27655      0     CDHDR   1 ARE MK115
    27654  1,852     CDHDR   1 ARE MK115
    Could any one provide pointers on where the Additional spool is generated from.
    Regards,
    - PSK
    Message was edited by: Sravan Pabbisetty

    Hi Tim,
    It seems this method requires a base, which is t2.privilege in your case. You need to call getFunctionWithArguments() on the base. So your code should be something like:
    Expression exp3 = parentEb.getTable("ALL_OBJECT_PRIVILEGES").getField("privilege");
    Vector args = new Vector();
    args.add(READ_PRIVILEGE_VALUE);
    Expression exp4 = exp3.getFunctionWithArguments("bitand",args).equal(READ_PRIVILEGE_VALUE);
    Shannon

  • Extend/Configure VS2013 to add additional Refactoring commands?

    Is it possible to Extend/Configure VS2013 to add additional Refactoring commands?
    I'm interested in a command similar to Resharper's Introduce Field for example.
    Introduce Field (Select an expression or a local variable and apply this refactoring. It will create a new field or constant and initialize it with the expression or local variable initializer. The field can be assigned in its initializer, type constructors
    or current members.)
    Thank you,
    Daniel
    bit.ly/danielsilion

    Thanks for Deric's help.
    Hi siliond,
    Thank you for posting in MSDN forum.
    Is it possible to Extend/Configure VS2013 to add additional Refactoring commands?
    I agree with Deric's suggestion, I think that you can use the extension of Resharper to add the refactorings in VS2013. Since the
    Visual Studio General Forum is not support the VS Extension tools issue, if you have any issue about the
    Resharper, please you submit a discussion to Q AND A on
    Resharper, may be you will get better support about the issue.
    Thanks for your undserstanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to add additional fields to zreport which contains standard report code

    Hi Experts,
    In order to add additional fields to standard report i copied the code into zreport but i am unable to  add additonal field into report because the code is looking so complex.
    standard report:AQZZ/SAPQUERY/FKF1============
         or
    sapmenu->accounting->financial accounting->accounts payable->information system->reports for accounts payable accounting->master data->S_ALR_87012087-Addresslist.
    Additional feilds to add is :Region,company code,country
    Please let me know how toidentify ALV and guide me how to solve this.
    Regards,
    naresh.

    Hello Naresh,
    First check whether these three fields are available in the text elements area.
    Please write your code in the subroutine %comp_ldesc.
    Repeat the code for your three new fields
    perform ldesc(rsaqexce) using 'G00010000X010       00  A1'
        %txt1 %txt2 %txt3 'LFA1-LIFNR' LFA1-LIFNR 'LFA1-LIFNR'.
      read table %textpool_langu into %textpool_langu_line
                                 with key ID = 'I' key = 'A01'.
      if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
      else. %txt1 = %txt_unknown.
      endif.
    So this subroutine will give you the basic list. Now Program is creating ALV with this basic list. So I think you don't need to worry about that. Please have a thorugh look at the code over this perform, and write accordingly.
    I think this is enoogh.
    Please update if you got the solution, which will be informative for others.
    regards,
    Antony Thomas
    Edited by: Antony Thomas on Jul 27, 2010 7:57 AM

  • How To Add Additional Fields When Creating New Contact From w/in Mac Mail?

    Hi there. When in Mac Mail and clicking on contact information provided within an email, we are able to either (1) CREATE NEW CONTACT or (2) ADD TO EXISTING CONTACT (by clicking on the arrow next to a phone number, address, etc.). If I choose "Create New Contact," how can I add additional fields BEFORE clicking on "Add to Address Book" button in lower right corner? Let's say, for example, I know this new contacts URL or company. (Currently, I am creating the new contact from within Mac Mail and then going to Address Book and finding the contact, then editing, the adding the additional fields, then saving, and then going back to Mac Mail. This all takes time.)
    Note: When creating a new iCal event from within Mac Mail, we can click on Option/Alt key when selecting drop-down arrow...and this will allow us to add additional information. The same feature isn't available for address book???

    I have the exact same question and problem. If there was a way to automatically open the AB entry after "creating new contact" this would solve it.
    Thanks for any suggestion

  • When i open safari on my Imac if i also open an additional window, when i then close them down and reopen safari they both paper again.also if i then add additional windows the additional windows keep coming up too

    when i open safari on my Imac if i also open an additional window, when i then close them down and reopen safari they both paper again.also if i then add additional windows the additional windows keep coming up too

    If you are running v10.7 Lion, disable Resume >  How To Disable Lion's 'Resume' Feature - MacRumors.com

  • How to add additional field to the existing report

    hi,
    report name is RHXPE_EXPIRED_QUALI
    if u execute report alv list is genereted with like this.
    object type, id of related object, object name, object type, id of related object,last name, first name like this
    where can i get these field descriptios in the prigram becoz many perform ststements r there. i want to add additional field text.
    program is:
    CORRECTIONS
    DATE       CORRECTION NOTE    AUTHOR DESCRIPTION
    09.03.2001            0388404 XSC    Wrong list output for multiple Os
    05.06.2001 AL0K023393 0410219 Lud    Wrong keydate for search with
                                         Pchbegda and pchendda.
    30.01.2002 S6BK000033 0491055 TS     Report: RHXPE_EXPIRED_QUALI
                                         doesn't provide a spool list.
    REPORT rhpk_find_pers_with_expired_qu MESSAGE-ID pq.
    TABLES : pchdy.
    INCLUDES
    INCLUDE rhxmacro.
    INCLUDE rhpeini0.
    TABLES
    DATA: objects  LIKE hrsobid    OCCURS 1 WITH HEADER LINE.
    VARIABLES
    DATA: subrc LIKE sy-subrc.
    DATA: orgeh_text LIKE t777o-otext.
    SELECTION SCREEN
    objid
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS:
       pchplvar LIKE p1000-plvar NO-DISPLAY,    "plan version
       pchotype LIKE pchdy-otype NO-DISPLAY. "objecttype
    Objid
    rhx-f4-objid-data.
    SELECT-OPTIONS:  pchobjid FOR pchdy-objid_str NO INTERVALS.
    Search
    PARAMETERS:
      pchseark LIKE pchdy-seark.           "matchcode object plom.
    SELECTION-SCREEN END OF BLOCK b1.
    Objecttime
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    PARAMETERS: se_begd LIKE  p1000-begda DEFAULT sy-datum,  "'19000101',
                se_endd LIKE  p1000-endda DEFAULT high_date.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-005.
    PARAMETERS:
       h_events LIKE dynp_rhpp-gen_train,  "with training sugg
       h_qual LIKE dynp_rhpp-expired_qual. "with Qual
    SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN ON pchobjid.
      PERFORM check_objid_sign(rhxchk00) USING pchobjid-sign.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pchobjid-low.
      rhx-f4-objid-low pchplvar pchotype pchobjid '' ''.
    AT SELECTION-SCREEN.
      PERFORM check_plvar(rhxchk00) USING pchplvar.
      PERFORM check_seark(rhxchk00) TABLES pchobjid
                                    USING  pchseark pchplvar pchotype.
    INITIALIZATION
    INITIALIZATION.
      PERFORM read_t77s0_parameters_for_pe.
    get user parameters/Planvariante und Beginndatum setzen:
      pchotype = $orgeh.
      CALL FUNCTION 'RHP0_USER_PARAMETERS_GET'
           EXPORTING
                fill_if_initial = 'X'
           IMPORTING
                plvar           = pchplvar
                begda           = se_begd
                endda           = se_endd
              with_key        =
              SUBSTITUTE      =
              ESSENTIAL       = only_essential
                org_unit        = pchobjid-low
          EXCEPTIONS
                OTHERS     = 0.
    SE_BEGD = LOW_DATE.   "Correction AL0K023393 0410219
      IF NOT pchobjid-low IS INITIAL.
        pchobjid-sign   = 'I'.
        pchobjid-option = 'EQ'.
        APPEND pchobjid.
      ENDIF.
    START-OF-SELECTION
    START-OF-SELECTION.
    correction 0491055
    correction was done for getting a spool list in background-processing.
      CASE sy-batch.
        WHEN space.
          SUBMIT rhpe_expired_quali
               WITH pchplvar = pchplvar
               WITH pchotype = pchotype
               WITH pchobjid IN pchobjid
               WITH pchbegda = se_begd
               WITH pchendda = se_endd
               WITH h_qual = h_qual
               WITH h_events = h_events
                      AND RETURN.
        WHEN 'X'.
          SUBMIT rhpe_expired_quali
               WITH pchplvar = pchplvar
               WITH pchotype = pchotype
               WITH pchobjid IN pchobjid
               WITH pchbegda = se_begd
               WITH pchendda = se_endd
               WITH h_qual = h_qual
               WITH h_events = h_events
                      TO SAP-SPOOL.
      ENDCASE.
    END-OF-SELECTION
    END-OF-SELECTION.

    Hi,
    I think you need to show more programs.
    you said, the report program is 'RHXPE_EXPIRED_QUALI', but you upload  'rhpk_find_pers_with_expired_qu' program.
    usually, ALV field is modifyed in 'PERFORM fieldcatalog_modify', if you use Functional ALV.
    Try to search 'fieldcatalog function', you will find easy.
    Regard,
    SY Kim

  • How to add additional lines to the Order Form template?

    I purchased and installed Acrobat Pro 9 because of its ability to create forms and found the Order Form template is just perfect for what I need, why reinvent the wheel, right?   Except I found I can't figure out how to add additional object that duplicate what is already there.  I highlighted an entire row and tried to just copy and paste but the past function put the copied objects at the bottom of the form in what looks like a group, all out of order.  I tried looking in the online help for a possible key combination that would inset an additional row of objects but couldn't find any.
    Also the form doesn't move down and create a new page keeping all the other elements in line, it moves to the bottom of the current page and stops.   Thought the template was based on a table so I was going to insert additional rows thinking once it reached the bottom of the current page it would automatically break to a new page and continue, but it's not a table.  So my question is, how can I add duplicate object that match the Order Form templates Item, Description, etc. objects?  I've come to realize learning to use this product is not going to be as simple a proposition as I was lead to believe.  O well, live and learn!
    If someone can point me in the right direction, any help is greatly appreciated.
    Tony Rodriguez

    Thanks, Barney! It's even easier than the solution I came to: copying and pasting into the field. 

  • Can i use an external hard drive in windows to add additional storage after my initial partition is set up. i want to add a 500 GB hard drive to use with my windows. I set windows up in boot camp with a 50 GB partition?

    can i use an external hard drive in windows to add additional storage after my initial partition is set up. i want to add a 500 GB external hard drive to use with my windows. I set windows up in boot camp with a 50 GB partition? I now want to add another 500 GB?

    Yes. Windows supports external USB drives.

  • I bought a bluetooth Bose speaker so I could listen to music from my imac in multiple rooms at the same time. I wanted to use BOTH my existing speakers using the headphone jack and add additional bluetooth speakers in other rooms, but the imac wants me to

    I bought a bluetooth Bose speaker so I could listen to music from my imac in multiple rooms at the same time. I wanted to use BOTH my existing speakers using the headphone jack and add additional bluetooth speakers in other rooms, but the imac wants me to pick one or the other, is there a way to have both?

    I asked same question
    Any answers

  • How do I add additional pages to a book?

    How do I add additional pages to a book?

    Just below the thumbnails of the existing book pages is a + button. Press this and the pop-up menu "speaks for itself".

  • How do I add the ClearCache argument to a tab's url?

    How do I add the ClearCache argument to a tab's url? When I click on a tab, I want to clear the page items values.

    Adrian,
    Okay, first realize that when you press a standard tab, it's just like a button that submits whatever page you're on. Then the on-submit-before-computation processes and after-submit computations on that page fire. Then the page defined as the target for the pressed tab is redirected-to. There is no way to alter the target URL of that branch generically for the tab. Consider a tab T. Say you've defined that tab to go to page 20. if you are viewing page 2 and press tab T, page 2 gets submitted and then the engine redirects to page 20 as the target. A similar thing happens if you are viewing page 3, i.e., page 3 will get submitted and you'll get redirected to page 20.
    So, the only way I know of to do what you asked is to create an application-level process that fires on-submit-before-computations that examines the current page ID and request value (which will identify the tab pressed) and then would clear cache for one or more pages as you require. Since this would fire before the tab-associated branch, it should produce the result you described.
    Scott

  • Is it possible to add 'Additional Data C' tab in VA01/VA02/VA03

    Hi All,
    Is there any way or in config that we can enhance the VA01/VA02/VA02 with one more tab other than 'Additional Data B' tab.
    i want to add 'Additional Data C' tab for a requirement.
    Please give your valuable comments.
    Thanks,
    Jaffer Ali.S

    Hi ,
    It can't done for the VA01/VA02/VA03.
    these are available for the .
    V45A0001  Determine alternative materials for product selection --->The Description of this enhancement tell us that it determines the alternative materials for product selection. (i.e., If  one material is not available what is the other material that has to be used as an alternative. So it is item specific).
    V45A0002  Predefine sold-to party in sales document--->By Description we understand that we can predefine sold-to party in the sales document. (i.e., it is used to populate the field sold-to party through user-exit while entering the data. ) But our requirement comes after entering the data in the screen and save button is pressed.
    V45A0003  Collector for customer function modulpool MV45A
    V45A0004  Copy packing proposal---->Copy packing proposal Into Out bound delivery. This description implies that  whenever we create a Delivery Order from Sales Order it copies the packing proposal  Based on the already created Sales order. So, there is no chance for us to save the data while we create or change a Sales order.    
    We can't done.
    Regards,
    Bharani

  • BAPI to add additional partner functions in customer master(KNA1)

    Hello All,
    I wanted to add additional partner functions(2) to the list of partner functions which gets added by default while creating a customer. I am currently using BAPI_CUSTOMER_CREATEDATA1 to create the customer master. There i do not find any option to add my partner functions.
    NOTE: I need to update KUNN2 field as well while adding my partner functions.
    Could anyone please help here?
    Regards,
    Jay

    Hi,
    No you should not feel confident with SD_CUSTOMER_MAINTAIN_ALL.
    It is used for only one very special case. The maintenance of consumer. And this should only be true from the transaction itself.
    There exists other cases, one of the oldest one is the BAPI_CUSTOMER_CREATEFROMDATA1. But is is exclusively reserved for SAP Online store.
    Despite the fact CMD_EI_API is quite difficult to use, it has the main benefit that is it supported if being triggered directly.
    For the maintenance of customers, there is NO BAPI and NO direct function module.
    There are some functions modules like the one above where the name is looking nice. But these should not be used.
    The only valid solutions are :
    Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See note 384462
    Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API and VMD_EI_API
    Hope this helps
    BR
    Alain

  • BP - Add additional Identification type as BPCCOD in Customer during replication

    Hi All,
    We have transferred all business partner from R/3 to CRM via initial load. We have Sold to party & Ship to party which are also assigned the BP role of Financial Partner and being used to create the Dispute Cases however we are unable to create the dispute cases in CRM system and also unable to search open item as Identification type BPCCOD with number as Logical system:Client is missing in the Financial Partner. As far as i know as per the SAP Standard functionality during customer download in CRM ID Type CRM002 gets added with ECC Account number by default.
    So is there any way through which i can get additional ID Type BPCCOD with Number Logical system:Client assigned to Customers during replication and also if there is any standard program to achieve this functionality?
    Thank you
    Anand Kumar

    Hi Anand,
    As per my understanding, you want to add additional Identification type and number while downloading the customer from ECC (Initial load).
    Go to tcode BUPA_CALL_FU.
    choose event CRMIN and refer BUPA_INBOUND_MAIN_CENTRAL FM as an example.
    Copy the FM and create a new FM.
    This FM has the changing parameter of structure BUS_EI_EXTERN.
    Add the code and Modify the data CENTRAL_DATA-IDENT_NUMBER as per your requirement.
    then maintain your function module in BUPA_CALL_FU in the right sequence (after standard FM call).
    I hope this will help you.
    Regards,
    Bala

Maybe you are looking for