Smartforms Conditions

Hi,
I have a problem with condition in a window.
I do this condition :
( SFSY-FORMPAGES = SFSY-FORMPAGES
IS_BIL_INVOICE-HD_GEN-BIL_TYPE = 'ZREG' )
OR
( SFSY-FORMPAGES = SFSY-FORMPAGES
IS_BIL_INVOICE-HD_GEN-BIL_TYPE <> 'ZINT' )
When i debug, i enter in this condition so that
SFSY-FORMPAGES = SFSY-FORMPAGES
IS_BIL_INVOICE-HD_GEN-BIL_TYPE = 'ZREG'
I have test that :
SFSY-FORMPAGES = SFSY-FORMPAGES
( IS_BIL_INVOICE-HD_GEN-BIL_TYPE = 'ZREG'
OR
( SFSY-FORMPAGES = SFSY-FORMPAGES
IS_BIL_INVOICE-HD_GEN-BIL_TYPE <> 'ZINT' )
and it's the same.
Thanks for your help.

I'm doing this condition to display the window :
( SFSY-FORMPAGES = SFSY-FORMPAGES
IS_BIL_INVOICE-HD_GEN-BIL_TYPE <> 'ZREG' )
OR
( SFSY-FORMPAGES <> SFSY-FORMPAGES
IS_BIL_INVOICE-HD_GEN-BIL_TYPE <> 'ZINT' )
My problem is that, when i have SFSY-FORMPAGES = SFSY-FORMPAGES and IS_BIL_INVOICE-HD_GEN-BIL_TYPE = 'ZREG'. He display the window. He should not display the window with this condition. I want to know if the condition i have write is good or not.
thanks

Similar Messages

  • 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'

  • If Condition in Smartform - window text- without program lines

    Hi,
       I have faced one problem in smartforms. In smartforms i have a window (main.) It has five lines. For Fifth line only i need to check one condition. if it is true then print the Line otherwise i need one Blank line to print.
    How i write if condition in smartforms window - text. 
    Mahesh.

    Hi Mahesh,
    You need to create and alternative node and put your text into that.  An alternative will check a condition, and process one of two nodes depending if it is true or false.  Based on your condition, on true you can have your current text element and on false a text element containing a blank line.
    Regards,
    Nick

  • Using if condition in smartforms

    Hi,
    I have a requirement like the following in smartforms
    if condition satisfy display one set of text or else some other text.(or don't display)
    how we can write code in smartforms (not in driver program).If any body knows tell me.
    Thanks
    Regards,
    Nandha

    Right click on the window you want to implement the code
    Choose Create-> Flow Logic -> Alternative
    In the true part -> Right Click (Choose)
        Create the Text Elements to be displayed
    To implement the code block choose
    ((( Create -> Flow Logic -> Programs Lines (write your ABAP Code here) ))
    Message was edited by: Kanthimathi Krishnan

  • Issue with if condition in smartform text elements

    Hi all.
    iam having a problem in smart forms
    itab has 3 fields
    id   matnr    werks
    1 a p1
    1 b p2
    1 c p3
    2 b l1
    2 c l2
    3 q u1
    3 l u2
    i neead output like in the smart form
    -id = 1-
    a p1
    b p2
    c p3
    -id = 2-
    b l1
    c l2
    -id = 3-
    q u1
    l u2
    I have aloop in main window
    itab into wa_itab.
    then i have program lines
    iam writing any perform statment insted iam write the code in here
    input paramters wa_itab-id
    output paramters id
    i declared id type zabc-id under global data in global definations
    CLEAR : ID.
    ON CHANGE OF WA_itab-ID.
    *BREAK point.
    ID = WA_ITab-iD.
    ENDON.
    after the program lines i have a text
    /: if &id& ne ' '.
    ---id = &id& ---
    /: endif
    &wa_itab-matnr&  &wa_itab-werks&
    now i see the output
    -id = 1-
    a p1
    -id=-  i don't need this (&id& has no value)
    b p2
    -id=-  i don't need this
    c p3
    -id = 2-
    b l1
    -id=-  i don't need this
    c l2
    -id = 3-
    q u1
    -id=-  i don't need this
    l u2
    I checked my code if two items have same id the id has no value and you can see the output also
    but for some reason its still goinng into the if condition
    And also is there away that i can debugg my text elements like in scripts. my break point doesn't take me to the text elements
    Thanks

    1. Move only the ID into one internal table say i_id,
    2. Now in your smartform,  create a table and loop at i_id into wa_id.
    3.Print your ID in a text, &wa_id-id&
    3. Now in main area  of the table Create a loop with the internal table you mentioned above with 3 elements, say, i_data into wa_data  give CONDITION as wa_data-id = wa_id-id.
    4. Print your other values &wa_data-matnr& &wa_data-werks&
    5. outside main area, clear the work areas.
    This should work fine as i use the same logic in one of my current developments!!!

  • IF CONDITION IN SMARTFORM.

    Hello all,
    Just facing a small problem in smart form.
    The code goes as follows ::
    PLANT: &GRLABEL-WERKS&
    /* Codes works fine. Displayed correctly.
    /: IF &GRLABEL-WERKS& = '01'
    Inside IF
    /: ELSE
    Outside IF
    /: Endif
    The problem is in if condition. Its going in else part even if first condition is satisfied.
    Is ht ere any problem in hte code or anything?? I am not getting a way out.
    Please help me.

    /:PROTECT
    WBS ELEMENT: &W_GRLABEL-PS_PSP_PNR&
    PLANT: &W_GRLABEL-WERKS& //
    /: IF &W_GRLABEL-WERKS& = '6001'
    INSIDE IF
    /: ELSE
    OUTSIDE IF
    /: ENDIF
    /: ENDPROTECT
    THE Code goes as above.
    All the values are populated properly and are checked.
    The values are passed from the ABAP Code to smartform using a  structure.
    All is fine but the IF is not working.
    It should either execute "If or else" but in my case its executing both.
    If one condition is satisfied, it should not go in the else part but its going.

  • How to delete a row of a template by giving a condition in the smartform

    hi all,
    I HAD A TEMPLATE IN A SMARTFORM.
    WHICH CONSISTS OF 4ROWS AND 4 COLOUMNS.
    MY REQUIREMENT IS .
    IF I SPECIFY A PARTICULAR PLANT(WERKS) CONDITION FOR EXAMPLE 2060.
    THE ENTIRE 4TH ROW WITH CONTENTS HAS TO BE DELETED.
    AND FOR OTHER PLANTS IT HAS TO BE NORMAL.
    NOTE :  NOT ONLY THE CONTENTS BUT ALSO THE ENTIRE 4TH ROW NEEDS TO BE DELETED
    regards

    Hi,
    There are 2 ways to achieve the results you want.
    1) Instead of creating a TEMPLATE under node, use TABLE option available. Provide name of the internal table of 4 * 4 as Resource internal table in DATA tab of Table. Before Table node, add program lines containing the logic to remove the line based on the condition you want.
    2) Create 2 different templates. One containg 4 rows, another containg 3 rows. In CONDITION tab of both the template , provide the conditions for which the templates will be visible. Solution will definitely work out still not preferable as the scenario you mentiioned is clearly a requirement of Table and not template.
    Regards,
    Amee.

  • 'AND' Conditional operator in smartform

    Hi experts,
    I have  to use AND condition in smartform (text).
    For OR condition there is a standard icon sothat can use.
    But how can we get AND contion in smartform.
    if I am giving AND condition it is showing error
    I have tries in SDN before posting my problem but i couldn't get solution for that
    Please help me out of this problem.

    Hi Saravanan,
    You dont need to give AND condtion. Just give two conditions in the conditions tab. it will work
    Regards
    Shanly

  • Term&conditions in the purchase order smartform

    Dear friends ,
                   I am struggling with a purchase order smartform where in the first page  layout i have
    1.addres
    2logo
    3. po header detail
    4.delivery window
    5. and now i have a table in the main window to dispaly the item and tax details.
    6.And then a footer window.
    All this is fine i did. but in the next layout
    1. the remaiing part of the item details
    suppose there are 7 items in first page 6 items and footer is displayed nad in the next page item no-7 and then
    2.P.o value
    3.terms & conditions
    4. footer is display..
    I am very confused...as if the item is 10 then how i will manage the positions of the terms & conditions and footer windows.
    pls help ....
    on how to design for the second page..i am not well versed with new page-counters..may be that is stopping me ..
    pls advice...
    thanks.

    Hi Simraan,
    I guess u just want the term's and condition window to be printed only once after the all the items in main window are printed.
    If this is the issue,
    then solution is as follows------>>>>>>>
    As main window length is variable....it extends according to the no. of table entries can extend to number of pages.
    if u want to make anything print just after the complete print out of table in main window then u can declare a TABLE LINE inside the footer of the table and go to Condition tab of the Table line in smartform there in bottom there would be an event ONLY AT PARAGRAPH END, Select this even, once u select this event and inside the corresponding table line if u declare ur terms and conditions then this table line would be printed just Once in ur smartform just after the Complete print of ur table in Main Window.
    Hope this resolves ur issue.
    Regards,
    Akash Rana

  • Exception condition "CNTL_ERROR" raised.  in WDA :  smartform to pdf

    Hii, 
    I am using a webdynpro - abap application. I am showing  a smartform as a pdf in one on the windows.
    When the link in the main window is clicked, a secondary window. Instead of the pdf, I get following exception.Kindly help me understand, where would I be going wrong. Let me know if more details required.
    *Exception condition "CNTL_ERROR" raised. *
    Form: PBO_HTML_CONTROL of program SAPLSTXBC
    Module: HTML_CONTROL of program SAPLSTXBC
    Function: SSFCOMP_PDF_PREVIEW of program SAPLSTXBC
    Method: DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_COMPONENTCONTROLLER~DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: ONACTIONPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    The code in the DISPLAYPDF method is as follows:
    method DISPLAYPDF .
    DATA: I_RS38L_FNAM TYPE  RS38L_FNAM.
    DATA: CTRL TYPE SSFCTRLOP.
    DATA: OUT TYPE  SSFCOMPOP.
    DATA: I_SSFCRESCL TYPE SSFCRESCL.
    DATA: LT_OTFDATA TYPE TABLE OF ITCOO.
    CTRL-GETOTF = 'X'.
    CTRL-NO_DIALOG = 'X'.
    CTRL-PREVIEW = 'X'.
    OUT-TDNEWID = 'X'.
    OUT-TDDELETE = ' '.
    data: i_tsp03 type tsp03.
    clear i_tsp03.
    select single * from tsp03 into i_tsp03.
    *OUT-TDDEST = i_tsp03-PADEST.
    OUT-TDDEST = 'TEP1'.
    ********get context data
      DATA lo_nd_zwebquestionaire TYPE REF TO if_wd_context_node.
      DATA lo_el_zwebquestionaire TYPE REF TO if_wd_context_element.
      DATA ls_zwebquestionaire TYPE wd_this->element_zwebquestionaire.
    * navigate from <CONTEXT> to <ZWEBQUESTIONAIRE> via lead selection
      lo_nd_zwebquestionaire = wd_context->get_child_node( name = wd_this->wdctx_zwebquestionaire ).
    * get element via lead selection
      lo_el_zwebquestionaire = lo_nd_zwebquestionaire->get_element(  ).
    * get all declared attributes
      lo_el_zwebquestionaire->get_static_attributes(
        IMPORTING
          static_attributes = ls_zwebquestionaire ).
    ********get context data ends
    data: itab1 type TCHAR255.
    data: itab2 type TCHAR255.
    data: itab type zprint. "addition by chandani
    data fm_name type rs38l_fnam..
    clear fm_name.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME             = 'ZCPESMARTFORM'
      IMPORTING
        FM_NAME              = fm_name
      EXCEPTIONS
        NO_FORM              = 1
        NO_FUNCTION_MODULE   = 2
        OTHERS               = 3.
    CALL FUNCTION fm_name
    EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = CTRL
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
       OUTPUT_OPTIONS             = OUT
       USER_SETTINGS              = ' '
       NAME                       = 'test'
       ZWEBQUESTIONAIRE           = ls_ZWEBQUESTIONAIRE
    IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = I_SSFCRESCL
    *   JOB_OUTPUT_OPTIONS         =
    TABLES                                  "addition by chandani
      itab                         = itab   "addition by chandani
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    REFRESH LT_OTFDATA.
    LT_OTFDATA[] = I_SSFCRESCL-OTFDATA[].
    CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
      EXPORTING
        I_OTF                          = LT_OTFDATA
    * EXCEPTIONS
    *   CONVERT_OTF_TO_PDF_ERROR       = 1
    *   CNTL_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.
    DATA: PDF_DATA TYPE XSTRING,
          PDF_SIZE TYPE I.
    DATA: L_DUMMY TYPE STANDARD TABLE OF TLINE.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
    *   MAX_LINEWIDTH               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
    *   PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = PDF_SIZE
       BIN_FILE                    = PDF_DATA
      TABLES
        OTF                         = LT_OTFDATA
        LINES                       = L_DUMMY
    * EXCEPTIONS
    *   ERR_MAX_LINEWIDTH           = 1
    *   ERR_FORMAT                  = 2
    *   ERR_CONV_NOT_POSSIBLE       = 3
    *   ERR_BAD_OTF                 = 4
    *   OTHERS                      = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      DATA lo_nd_pdf TYPE REF TO if_wd_context_node.
      DATA lo_el_pdf TYPE REF TO if_wd_context_element.
      DATA ls_pdf TYPE wd_this->element_pdf.
      DATA lv_sources LIKE ls_pdf-sources.
    * navigate from <CONTEXT> to <PDF> via lead selection
      lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
    * get element via lead selection
      lo_el_pdf = lo_nd_pdf->get_element(  ).
    * get single attribute
      lo_el_pdf->Set_attribute(
        EXPORTING
          name =  `SOURCES`
          value = PDF_DATA ).
    endmethod.

    Hi,
    1) This error generally comes ,when your GUI version is old.Check this point & try to upgrade.
    2) Otherwise if you are running report in background,then check madhu kumar's reply in this link & try like this.
    Dump Error Raise_Exception CNTL_ERROR
    Also search OSS notes.
    Thanks
    Gourav.

  • Pricing Condition in SMARTFORMS

    Hi All,
    I am working on smartforms.I have given select query for codition records like following.
    SELECT SINGLE  KBETR FROM  KONV   INTO TOTAL WHERE KNUMV = VBDKA-KNUMV AND KPOSN = VBDPA-POSNR AND KSCHL = 'PR00'.
    Its displaying error that VBDKA is not maintained in DICTIONARY.
    I need to check condition from VBDKA(not a header table).
    How to get condition from the table VBDKA AND VBDPA?
    I want to do it smartform only.
    Thanks,
    Murthy

    if you do the select in the smartform then you should also add the tables
    tables: VBDKA
    in the header coding
    kind regards
    arthur

  • Exception condition "CNTL_ERROR WD-abap Smartform to pdf

    Hii, 
    I am using a webdynpro - abap application. I am showing  a smartform as a pdf in one on the windows.
    When the link in the main window is clicked, a secondary window. Instead of the pdf, I get following exception.Kindly help me understand, where would I be going wrong. Let me know if more details required.
    **Exception condition "CNTL_ERROR" raised. **
    Form: PBO_HTML_CONTROL of program SAPLSTXBC
    Module: HTML_CONTROL of program SAPLSTXBC
    Function: SSFCOMP_PDF_PREVIEW of program SAPLSTXBC
    Method: DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_COMPONENTCONTROLLER~DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: ONACTIONPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    The code in the DISPLAYPDF method is as follows:
    method DISPLAYPDF .
    DATA: I_RS38L_FNAM TYPE  RS38L_FNAM.
    DATA: CTRL TYPE SSFCTRLOP.
    DATA: OUT TYPE  SSFCOMPOP.
    DATA: I_SSFCRESCL TYPE SSFCRESCL.
    DATA: LT_OTFDATA TYPE TABLE OF ITCOO.
    CTRL-GETOTF = 'X'.
    CTRL-NO_DIALOG = 'X'.
    CTRL-PREVIEW = 'X'.
    OUT-TDNEWID = 'X'.
    OUT-TDDELETE = ' '.
    data: i_tsp03 type tsp03.
    clear i_tsp03.
    select single * from tsp03 into i_tsp03.
    *OUT-TDDEST = i_tsp03-PADEST.
    OUT-TDDEST = 'TEP1'.
    ********get context data
      DATA lo_nd_zwebquestionaire TYPE REF TO if_wd_context_node.
      DATA lo_el_zwebquestionaire TYPE REF TO if_wd_context_element.
      DATA ls_zwebquestionaire TYPE wd_this->element_zwebquestionaire.
    * navigate from <CONTEXT> to <ZWEBQUESTIONAIRE> via lead selection
      lo_nd_zwebquestionaire = wd_context->get_child_node( name = wd_this->wdctx_zwebquestionaire ).
    * get element via lead selection
      lo_el_zwebquestionaire = lo_nd_zwebquestionaire->get_element(  ).
    * get all declared attributes
      lo_el_zwebquestionaire->get_static_attributes(
        IMPORTING
          static_attributes = ls_zwebquestionaire ).
    ********get context data ends
    data: itab1 type TCHAR255.
    data: itab2 type TCHAR255.
    data: itab type zprint. "addition by chandani
    data fm_name type rs38l_fnam..
    clear fm_name.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME             = 'ZCPESMARTFORM'
      IMPORTING
        FM_NAME              = fm_name
      EXCEPTIONS
        NO_FORM              = 1
        NO_FUNCTION_MODULE   = 2
        OTHERS               = 3.
    CALL FUNCTION fm_name
    EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = CTRL
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
       OUTPUT_OPTIONS             = OUT
       USER_SETTINGS              = ' '
       NAME                       = 'test'
       ZWEBQUESTIONAIRE           = ls_ZWEBQUESTIONAIRE
    IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = I_SSFCRESCL
    *   JOB_OUTPUT_OPTIONS         =
    TABLES                                  "addition by chandani
      itab                         = itab   "addition by chandani
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    REFRESH LT_OTFDATA.
    LT_OTFDATA[] = I_SSFCRESCL-OTFDATA[].
    CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
      EXPORTING
        I_OTF                          = LT_OTFDATA
    * EXCEPTIONS
    *   CONVERT_OTF_TO_PDF_ERROR       = 1
    *   CNTL_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.
    DATA: PDF_DATA TYPE XSTRING,
          PDF_SIZE TYPE I.
    DATA: L_DUMMY TYPE STANDARD TABLE OF TLINE.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
    *   MAX_LINEWIDTH               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
    *   PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = PDF_SIZE
       BIN_FILE                    = PDF_DATA
      TABLES
        OTF                         = LT_OTFDATA
        LINES                       = L_DUMMY
    * EXCEPTIONS
    *   ERR_MAX_LINEWIDTH           = 1
    *   ERR_FORMAT                  = 2
    *   ERR_CONV_NOT_POSSIBLE       = 3
    *   ERR_BAD_OTF                 = 4
    *   OTHERS                      = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      DATA lo_nd_pdf TYPE REF TO if_wd_context_node.
      DATA lo_el_pdf TYPE REF TO if_wd_context_element.
      DATA ls_pdf TYPE wd_this->element_pdf.
      DATA lv_sources LIKE ls_pdf-sources.
    * navigate from <CONTEXT> to <PDF> via lead selection
      lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
    * get element via lead selection
      lo_el_pdf = lo_nd_pdf->get_element(  ).
    * get single attribute
      lo_el_pdf->Set_attribute(
        EXPORTING
          name =  `SOURCES`
          value = PDF_DATA ).
    endmethod.

    Use -  with gui_download
    call method cl_gui_frontend_services=>environment_get_variable
    exporting
    variable = p_envir_name
    changing
    value = ls_envir_path
    exceptions
    cntl_error = 1
    error_no_gui = 2
    others = 3.
    call method cl_gui_cfw=>flush
    exceptions
    cntl_system_error = 1
    cntl_error = 2
    others = 3.
    And refer the below notes: 972762
    ITS 620 Patch 23 and SAPKB62061
    ITS 640 Kernel Patch 148 and SAPKB64019
    ITS 700 Kernel Patch 77 and SAPKB70010
    and also refer the link below to get more info
    http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15
    thanx
    suriya

  • How to display smartform table content in condition basis

    Hi experts
         In smartform, can i display the content of table in a condition basis.
         For example am displaying 4 rows in a page.
         If the rows exists more than 4, remaining rows i want to display in next page.
         Is it possible, if so, how to do, pls anyone help me on this.
    Thanks in advance.
    Regards
    Rajaram

    hi,
    use the command which is present in the flowlogic.
    In that tick the <b>Go to new page</b> check box and write the page no. into the i/o bos besides it and write the condition whatever it is.
    thanks
    Dharmishta

  • How to Handle Blank Field Value based Condition in SmartForms

    Dear Sir,
    In SMARTFORM , we need to define a Condition that incase Field Value is not equal to  BLANK value (blank means that field is empty) then a specific text gets printed .
    Our problem is that  We do not know as how to define  Empty Field Value  based condition .
    Had it been Non Empty Field value based condition then solution was simple and could be done in following way :
    Field Value                        R                     Comparision Value
    WA_KZDKZ                      =                      'X'
    In our case , we need to give Blank (Empty Value) instead of 'X' .
    Kindly help us pl .
    Rgds
    B Mittal

    Hi,
    To handle blank field values in SMARTFORMS,
    Go to the conditions tab in your SMARTFORM and give condition there
    Field                Comparision operator          value
    <Field name>      <> Here symbol is diff     space.
    eg:
    wa_mara-matnr    =/                                   space.
    Regards,
    Santosh Kumar M.

  • Smartforms: Window on Condition

    HI Experts,
                    In my PO under smartforms, I have table in main and couple of windows below that. I want to show the below window on particular condition. If the rows in table greater that 9, below window will show on next page else on first page. Should I have to write a condition ( True / false ) for that window. where should I have to write a condition. Plz describe me in brief. Thanks.
    KHan.

    Hi
    Declare a global variable, say g_lines of type integer and describe the table lines into the variable in Initialization if you are importing the table from the print program or after the table is populated.
    You need to creat 2 windows, one in the first page and other in the second page.
    For the window in first page, give the condition if g_lines < 9 and in second page give the condition as g_lines > 9.
    When table lines are less than 9, the first page condition will be and will be displayed and second page window will be false and will be hidden and vice-versa when the lines greater than 9.
    Regards
    Navneet

Maybe you are looking for

  • How to connect Ipad 4 to HD tv

    I got a 4th gen ipad witch has the lightning connection  i would like to hook it up to my hdtv threw hdmi i have the foiling items that i am trying to use  but when i connect it i get no picture will this method not work do i need a special connecter

  • Assigning a numerical value to the answers of a multiple choice text field

    I have searched and searched thru a million articles but there does not seem to be a simple way to do this, and I hope like heck that I am just overthinking it.  I tend to fall back on years of coding and completely miss a simple answer when doing th

  • Change language on the security warning popup when using signed applets

    Hi Today when we use a signed applet the user get a security warning popup box where the langauge is English. Is it possible to change the language to other that English and if possible how can this be done ? Thanks in Advance, Henrik Rasmussen Denma

  • HT6154 Lost Contacts

    My daughter and I share an Apple ID.  Had several contacts on my phone and now all I see are my daughter's contacts.  Mine are gone.  How do I get them back?

  • Compliance HealthSet unhealthy

    Hello, Today at 8 AM our Exchange 2013 server compliance health set went into unhealthy state.  I would like help understanding what this means and what kind of negative impacts this could have on the email server.  I'm not sure where to go here but