Multiple smartform conditions

Hi,
I am facing problem with multiple conditions for a node.
My requirement is that node should be displayed only
a) Amt is greater than zero
b) Invoice type NE 'IV' and company code NE '001'.
The condition fails in any of one scenarios ( tried with OR and AND combinations).
Any advise or alternative solutions would be helpful .
Thanks
Regards
Reddy

Hi,
It wud be better to create a W_flag variable in Global definitions TYPE FLAG..
Then create a Code node (Create -> Flow Logic -> Program Logics) .. keep this code node just before your existing node...
Put w_flag. w_amount , w_invoice_type and w_company_code in the Input Parameters. and Put w_flag in out parameters as well...
Now code like this as below in the editor..
if w_amount > '0'.
       if w_invoice_type ne 'IV' and w_company_code ne '001'.
                 w_flag = 'X'.
       endif.
endif.
Now in your existing node you can use this Flag as a condition .. So put this in Condition tab... as below:
Field name     relational operator       Com value
W_FLAG             =                            'X'

Similar Messages

  • Using multiple 'and' conditions in a SQL query

    Is it possible to reduce the SQL required to query using multiple 'and' conditions, e.g. I have a query like the following:
    select stat.personal_id, appt.username, appt.password, apps.rgn_apt_id, apps.apy_apn_id
    from apy_ast_application_status stat, rgn_usr_user appt, rgn_aps_applications apps
    where stat.apy_apn_id = apps.rgn_apt_id
    and apps.rgn_apt_id = appt.rgn_apt_id
    and stat.application_completed is null
    and stat.application_started_date > '01-MAY-11'
    and stat.amount_paid is null
    and stat.personal_details = 'C'
    and stat.further_details = 'C'
    and stat.education = 'C'
    and stat.employment = 'C'
    and stat.personal_statement = 'C'
    and stat.choices = 'C'
    and stat.reference = 'C'
    and stat.student_finance = 'C'
    Is there a way, to reduce all the multiple 'and' queries, to be read from say one line? If you know what I mean.......

    Ah, Ok this looks nice, thanks very much. It doesn't quite run as is because the stat.amount_paid query value is 'is null', while the others are 'C'. I tried amending the relevant line to various versions of the following:-
    in (select 'is null' 'C','C','C','C','C','C','C','C' from dual)
    which doesn't work.
    I can get the following to work so I am assuming that the it is not possible to use different query values within the brackets of the 'in (select....' statement?
    select stat.personal_id, appt.username, appt.password, apps.rgn_apt_id, apps.apy_apn_id
    from apy_ast_application_status stat, rgn_usr_user appt, rgn_aps_applications apps
    where stat.apy_apn_id = apps.rgn_apt_id
    and apps.rgn_apt_id = appt.rgn_apt_id
    and stat.application_completed is null
    and stat.application_started_date > '01-MAY-11'
    and stat.amount_paid is null
    and (stat.personal_details, stat.further_details, stat.education,
    stat.employment, stat.personal_statement, stat.choices, stat.reference, stat.student_finance)
    in (select 'C','C','C','C','C','C','C','C' from dual)
    Thanks for everybodys help - the suggested alternatives seem so much more elegant

  • How to update multiple Price conditions in FM CRM_ORDER_MAINTAIN

    Hi All,
          need to update multiple price conditions in a contract Thru FM CRM_ORDER_MAINTAIN.
    please see the piece of code that am using...
      am able to update single price condition...but not able to populate 2 or more .......i,e..ADD A Condition
    i,e...DATA : ls_cond TYPE prct_cond_external_input,
           lt_cond TYPE prct_cond_external_input_t.
    DATA : ls_con TYPE PRCT_COND_DU,
           lt_con TYPE PRCT_COND_DU_TAB.
    Create Condition Type
    *ls_con-KNUMV = lv_header_guid.
    *ls_con-KPOSN = lv_item_guid.
    ls_con-stunr  = '134'.
    IF Y EQ 1.
      ls_con-ZAEHK = '001'.
    ELSE.
       ls_con-ZAEHK = '002'.
    *ENDIF.
    *ls_con-kschl = 'ZFP1'.
    **ls_cond-waers = 'CNY'.
    *ls_con-kbetr = '0.00'.
    *ls_con-kpein = '1'.
    ls_cond-kschl = 'ZFP1'.
    ls_cond-waers = 'CNY'.
    ls_cond-kbetr = '0'.
    ls_cond-kpein = '1'.
    ls_cond-knumh = lv_item_guid .
    CLEAR ls_Price_doc.
    ls_Price_doc-ref_guid = lv_item_guid.
    ls_Price_doc-ref_kind = 'A'.
    IF Y EQ 1.
    ls_Price_doc-ref_handle = '000000001'.
    ELSE.
      ls_Price_doc-ref_handle = '000000002'.
    ENDIF.
    *ls_price_doc-PRIC_COND[] = lt_cond[].
    *INSERT ls_con into table ls_price_doc-PRIC_COND.
    INSERT ls_cond into table ls_price_doc-COND_ADD.
    INSERT ls_price_doc INTO TABLE lt_price_doc.
    ls_input_fields-ref_guid    = lv_item_guid.
    ls_input_field_names-fieldname = 'KNUMH'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KPOSN'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KSCHL'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KPEIN'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'STUNR'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'ZAEHK'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'WAERS'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    ls_input_field_names-fieldname = 'KBETR'.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CLEAR ls_input_fields.
    Ls_input_fields-ref_guid    = lv_item_guid.
    ls_input_fields-ref_kind    = 'B'.
    ls_input_fields-objectname  = 'PRIDOC'.
    *ls_input_fields-logical_key = '0001'.
    ls_input_fields-field_names = lt_input_field_names.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CLEAR ls_input_fields.
    CLEAR ls_Price_agreement.
    Clear ls_cond.
    I kept this under code. loop, for item records.....
    Though the internal table lt_price_doc. is holding all the records, it is updating only one record. can you any one pls guide me ,

    This example works fine for me. Modify it according to your needs...
    Price
                  IF it_item-value IS NOT INITIAL.
                    ls_cond-kschl = 'PR00'. " add price
                    ls_cond-kbetr = it_item-value.
                    ls_cond-waers = st_head-currency.
                    INSERT ls_cond INTO TABLE ls_pridoc_com-cond_add.   
                    index_2 = 1.
                    CLEAR: ls_cond.
                  ENDIF.
    Discount
                  IF it_item-discount IS NOT INITIAL.
                    ls_cond-kschl = 'ZPPP'. " add discount
                    wa_procent_calc = it_item-discount * 10.
                    ls_cond-kbetr = wa_procent_calc."it_item-discount.
                    ls_cond-waers = '%'."st_head-currency.
                    INSERT ls_cond INTO TABLE ls_pridoc_com-cond_add.   
                    index_2 = 1.
                    CLEAR: ls_cond, wa_procent_calc.
                  ENDIF.
                  IF index_2 = 1.
                    ls_pridoc_com-ref_handle = counter.
                    ls_pridoc_com-ref_kind = 'B'.
                    INSERT ls_pridoc_com INTO TABLE gt_pridoc_com.
                    CLEAR: index_2,ls_pridoc_com.
                  ENDIF.

  • Single spool for multiple smartforms

    Hi,
    I am using Function modules SSF_open and ssf_close for creating single spool for multiple smartforms but when i try to run the program in background then the job is getting cancelled...........and if i run the program in foreground then the program is running fine giving single spool for multiple forms........
    so the problem is that job should run in background if i run it in background instead job is getting cancelled.
    please tell me the solution how can i get the single spool for and multiple smartforms as well as the job should run if i am doing so.

    Moved to the correct forum

  • How to add multiple test conditions in 'test' attribute expression of xsl:if tag

    Hi all,
    How to add multiple test conditions in 'test' attribute expression of <xsl:if> tag ?
    I have 2 parameters and I want To skip the massage if this 2 conditions happened I tried to write it :
            <xsl:when test="($TransferToCompany = 0 and $ObjectInclide=1 )">
            <b1im_skip xmlns="" info=" Obect Will Not Transfer To company">
            </b1im_skip>
          </xsl:when>
    But I get an error while I am trying to transfer The object (Account) true B1if
    I am working with SBO 9 PL 13
    thank you
    shachar

    Hi saado
    Check this link:
    http://stackoverflow.com/questions/318875/can-you-put-two-conditions-in-an-xslt-test-attribute
    Kind regards,
    Radek

  • Can we call multiple Smartforms from single Driver Prog?

    Hi all,
    Can we call multiple smartforms from single Driver Program. Here Driver program is custom Program.
    I want to give Print Parameter only once and output should get printed one after the another smartform in same order of smarforms were called.
    If yes, then how?
    Thanks in advance.

    Yes, you can do this in your Smartform driver program.
    Each time you call you Smartform function module you will need to change the values in structure OUTPUT_OPTIONS slightly.
    On the first call set TDNEWID to X.
    After this, set it to space
    On the last form set TDFINAL to X.
    This will put all of the output into one spool request, in the order they are called in the program.
    Regards,
    Nick

  • Multiple smartforms call for transfer order

    Hi All,
    I have a requirement to call multiple smartforms based on customer number from same print program.How i would define nace setting and also in my requirement i have to create a ztable that will contain customer number and smartform name,that means i need to pic smartform name from that ztable for corresponding customer.But my form will trigger from transfer order transaction.
    Could you please help in this regard.
    Thanks
    Mohit

    Hi ankur,
    NACE setting doesn't happen for LT31(transfer order) transaction.Setting somewhere defined in SPRO in WM module.My problem is the i need to create ztable that is recommended by client to maintain customer number along with smartform name.
    Thanks
    Mohit

  • Multiple smartform output to single pdf file

    HI,
    I am new to ABAP. I have a requirement to combine multiple smartfrom output to  single pdf file.  I searched in this site. I got material but i did not get the complete concept. Can anybody tell me the methodology and sample code to do that.
    Thanks & regards,
    Maha.

    Hi Mahalakshmi,
    Clik on the link to view document: <b>[Combining Multiple Smartform Outputs Into One PDF File|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450?overridelayout=true]</b>
    Thanks
    Venkat.O

  • Multiple Smartform Printing without any Key press

    I have created a Smartform to display payslip. For every pernr New smartform is created. I am able to supress the popup for capturing printing data but F3 key needs to pressed to go to next pernr.
    Please provide me a solution so that i can preview all pernrs(multiple smartforms) at one go without pressing any key.

    Hi shailesh,
    Just refer this sample code which contains both single spool (i.e all the records are printed at shot) and individual spool request(i.e pressing the back button).
    TABLES:
      spfli.
    DATA:
      t_spfli type
        STANDARD TABLE OF spfli.
    DATA:
      fs_spfli TYPE spfli.
    DATA:
      w_form TYPE  tdsfname,
      w_flag TYPE i,
      f_nam TYPE rs38l_fnam,
      w_input   TYPE ssfcompin,
      w_control TYPE ssfctrlop.
    SELECTION-SCREEN BEGIN OF BLOCK blk  WITH FRAME.
    SELECT-OPTIONS s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF BLOCK blk .
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
    PARAMETERS:
    p_single RADIOBUTTON GROUP rad1,
    p_ind    RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN END OF BLOCK block1.
    START-OF-SELECTION.
      PERFORM display_data.
      PERFORM ssf_function_module_name.
      PERFORM spool_request.
    *&      Form  display_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display_data .
      SELECT *
      FROM spfli
      INTO TABLE t_spfli
      WHERE carrid IN s_carrid.
    ENDFORM.                    " display_data
    *&      Form  ssf_function_module_name
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM ssf_function_module_name .
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'Y_FORM'
        IMPORTING
          fm_name            = f_nam
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2.
    *  IF sy-subrc NE 0.
    *    MESSAGE 'Form cannot be displayed' TYPE 'E' .
    *  ENDIF.                               " IF sy-subrc eq 0
    ENDFORM.                               " ssf_function_module_name
    *&      Form  spool_request
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM spool_request .
    w_input-dialog = 'X'.
      CALL FUNCTION 'SSFCOMP_OPEN'
        EXPORTING
          input = w_input
        EXCEPTIONS
          error = 1.
    *" LOOP AT t_spfli .....................................................
      LOOP AT t_spfli INTO fs_spfli.
        w_control-no_open   = ' '.
        w_control-no_close  = ' '.
    *"Single spool request..................................................
        IF p_single EQ 'X'.
          w_control-no_open   = 'X'.
          w_control-no_close  = 'X'.
        ELSE.
    *"Individual spool request.............................................
          IF w_flag NE '1'.
            w_control-no_open  = 'X'.
            w_control-no_close = ' '.
            w_flag = 1.
            CALL FUNCTION '  '----->smartform function module
              EXPORTING
               control_parameters          = w_control
                fs_spfli                   = fs_spfli
             EXCEPTIONS
               formatting_error           = 1
               internal_error             = 2
               send_error                 = 3
               user_canceled              = 4.
           endif.                          " IF w_flag ne '1'
          ENDIF.                           " IF p_single eq 'X'.
          CALL FUNCTION '  '----->smartform function module
            EXPORTING
              control_parameters = w_control
              fs_spfli           = fs_spfli
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4.
        ENDLOOP.                             " LOOP at t_spfli into ...
    *&This function module close the spool request                        *
        CALL FUNCTION 'SSFCOMP_CLOSE'
          EXCEPTIONS
            error = 1.
      ENDFORM.                               " spool_request
    Regards,
    Sravanthi

  • Multiple pricing condition

    Hello experts,
    We have created a manual item condition for pricing but we have a problem when we enter the rate for that in the pricing screen.
    For example,
    "ZA01" is the one we created. Whenever we enter the value for that it automatically adds another line again and again after going to main order screen and back into Pricing screen again.
    ZA01 Discount for Rb              <- new line added
    ZA01 Discount for Rb    10.000 %  <- again
    ZA01 Discount for Rb    10.000 %
    It looks like this condition has multiple entry capability. I'm not familiar with item condition configuration but is there any way to prevent redundant multiple item condition entries?
    And also, from programming point of view, is it possible to delete manual item condition or combine it togther (10+10=20%)in XKOMV in one of the USEREXIT_XKOMV_... ?
    Regards,

    Hi,
    I think this condition type has been activated  as header condition as well as item condition, check in configurations...
    Its not a better way to delete/combine the condition values technically. Check out the configurations.
    Message was edited by: JITHENDRA CHADICHAL

  • Calling multiple smartforms in a single driver program.

    Hi ,
    Can anybody tell me how can I call multiple smartforms in a single driver program.
    Each form has been assigned a output type.
    Regards,
    Sudha.V

    Hi,
    Here i  have 2 smartforms assigned to different OUTPUT TYPES
    Use this way
    IF nast-kschl = 'FUCI'  .
        ci_form = 'ZLAYOUT'.
      ELSEIF nast-kschl = 'RD04'.
        ci_form = 'ZLAYOUT01'.
      ENDIF.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = ci_form
        IMPORTING
          fm_name            = fnam
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
    AFter this call the smartforms based on the output type
    Please closeif solved,
    Thanks,
    Aditya
    Edited by: aditya on May 21, 2008 6:15 PM

  • Calling multiple smartforms

    Hi All,
    My requirement is like this....
    Multiple smartforms are created by different programs..And now I want trigger all these smartforms with my program..Is it possible?
    When I tried to do like this it needs to come back and again print preview to go next smartform....Is is possible to call all the smartform at single execution.........
    Edited by: sundeep singh on May 30, 2008 9:06 AM

    g_output_options  TYPE ssfcompop, " Output Options for Smartform
    g_control_options TYPE ssfctrlop. " Control Options
    Control Options
      g_control_options-device    = 'PRINTER'.
      g_control_options-preview   = ''.
      g_control_options-no_dialog = 'X'.
    Output Options
      g_output_options-tdnoprev   = 'X'.
      g_output_options-tdimmed  = 'X'.
    Call Smartform
      CALL FUNCTION lv_fmname
        EXPORTING
        ARCHIVE_INDEX              =
        ARCHIVE_INDEX_TAB          =
        ARCHIVE_PARAMETERS         =
          control_parameters         = g_control_options
        MAIL_APPL_OBJ              =
        MAIL_RECIPIENT             =
        MAIL_SENDER                =
          output_options             = g_output_options
          user_settings              = ''  
    rwrd points if useful
    Bhupal

  • Multiple rebate condition types in one invoice

    I had defined multiple rebate condition types as Y000, Y001 and Y002, which are montly offtake rebate, distance rebate and yearly offtake rebate.
    Y000 and Y001 can be in the same validity period and also will be applicable to the same invoicee.
    When i create a rebate agreement for customer for Y000 and go for the settlement of the rebate it is happening fine.
    But for the same customer, i had defined Y001 as a rebate agreement type for the same period and materilal.
    The sales volume is not updated in the rebate agreement. Evenif I do VBOF the sales volume is not updated.
    the error that comes while doing VBOF is :
    "7000158055 Document number RCFL 7000158055 2011 was already assigned
    7000158053 Document number RCFL 7000158053 2011 was already assigned
    7000158052 Document number RCFL 7000158052 2011 was already assigned
    7000158054 Document number RCFL 7000158054 2011 was already assigned"
    Please help me to solve this problem.
    Mrs. Swati Pawar

    Hello Swati,
    the suggestion of JP is correct.
    I explain it better.
    - the document type of FI document created from SD depends on the customizing of billing type field TVFK-BLART. If it is blank, then by default is 'RV'.
    - if the number range assigned to the account document type is External, then the FI document gets the same number of the SD invoice.
    - transaction VBOF creates FI document referred to SD invoice. If it has external number range, and an FI document already exist with same number (created when SD invoice has been released to accounting), then the errof F5152 occurs.
    SOLUTION:
    in the selection screen of VBOF there is the field FI-Doc-type. Here you should specify the FI document type that should be created by execution of VBOF, and of course it must have number range internal.
    Please try this.
    Best regards,
    Ivano.

  • Combining multiple smartform output in one spool request

    Hi,
    I'm calling 5 different smart forms from driver program based on some conditions and trying to merge the output of each of these smart forms in a single spool request. I achieved this by setting control parameters no_open and no_close based on first or last print.
    The problem i'm facing now is when i call one particular smart form ZSMARTFORM6 along with other smartforms i'm getting a error FORM SMARTFORM6 has wrong Page format.
    If i call only this smart form it is working correctly.
    Any idea how to avoid this error message.
    Regards,
    Raghavendra

    Hi
    In The control Parameters u have an Option NO_OPEN   and NO CLOSE  u have to use this to combine multiple SSF to one Spool
    DATA SSFCTRLOP LIKE SSFCTRLOP.
    CALL FUNCTION 'SSF_OPEN'
    SSFCTRLOP-NO_OPEN = 'X'.
    SSFCTRLOP-NO_CLOSE = 'X'.
    CALL FUNCTION SMART1
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION SMART2
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION SMART3
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION SMART4
    EXPORTING
    CONTROL_PARAMETERS = SSFCTRLOP
    CALL FUNCTION 'SSF_CLOSE'
    Surya
    Edited by: suryareddy on Aug 27, 2009 9:24 AM

  • How to print multiple Smartform Templates

    Good day Gurus,
    I have 5 Smartform templates combined in one program. During printing if 1 data for each template is available, The pop-up screen also appears 5 times for me to print the templates. My question is how can I print the 5 templates using 1 pop-up screen. What I want is after pressing the PRINT button, all of the templates will automatically print.
    Note that P_V_CONTRACTTYPE varies depending on the template to be used. That's why this procedure appear 5 times also.
    For the controls, these are my inputs.
    - control-no_dialog = ' '.
    - control-preview   = ' '.
    - w_aux-tddest      = 'LP01'.
    determine smartform function module for service request
      call function 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = p_v_contracttype
        IMPORTING
          fm_name            = lf_fm_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          others             = 3.
       MESSAGE 'For Multiple Contracts, Only First 10 pages will be displayed.' TYPE 'I'.
      call function lf_fm_name
        EXPORTING
           output_options     = w_aux
           user_settings      = space
           control_parameters = control
          it_noutput          = it_noutput2
          var_lessee_rep      = var_lessee_rep
          var_uses            = var_uses
          var_basic_monthly   = var_basic_monthly
          var_secdep          = var_secdep
          var_lessee_add      = var_lessee_add
          var_other_charge    = var_other_charge
        TABLES
          it_lessee_rep       = it_lessee_rep
          it_noutputrent      = it_noutputrent
          it_uses             = it_uses
          it_basic_monthly    = it_basic_monthly
          it_percentage_rent  = it_percentage_rent
          it_secdep           = it_secdep
          it_noutputrentB     = it_noutputrentB
          it_lessee_add       = it_lessee_add
          it_other_charge     = it_other_charge
          it_noutput          = it_noutput2
           it_adv_rent         = it_adv_rent
        EXCEPTIONS
          formatting_error    = 1
          internal_error      = 2
          send_error          = 3
          user_canceled       = 4
          others              = 5.
    Thanks in advance.

    Use tdnewid in the control parameters to create spool number on each template.

Maybe you are looking for

  • How can I view my backed up files in my iCloud?

    I deleted some of my photos and videos on my iPhone and would like to recover them. My iPhone backed up on March 10th. How can I see the files that were backed up there?

  • Works in s40 but not in s60 nokia phones

    Hi, I have a midlet that works really well in s40 phones, but not in s60 phones. it runs really well in WTK2.5.1. Any ideas what could cause it? Thanks in advance!

  • Playlist refuses to burn.  Error message received every time.

    Error message received every time I attempt to burn a playlist:  The attempt to burn a disc failed.  The disc drive didn't respond properly and can't recover or retry.

  • SQL Query in JDBC

    Can somebody guide me on this Q i have: 1. can we write 2 separate SQL statements when we configure a JDBC adapter?

  • SUN ULTRA 5 - MAIN DRIVE

    Hello. Sorry about my english. I have a problem with SUN ULTRA 5. I removed the master drive (Seagate Model ST320420A) and installed new drive (Western Digital WD400EB - 40GB EIDE). The WD400EB capacity is 40GB but the OS (Solaris 2.6) recognize only