Re:Payement block

Is there any special configuration for block the payment

There is no special configuration for payment block.It can be done in three ways
1.Block complete vendor account by putting payment block in vendor master.
2.While posting invoice enter payment block in the line item
3.While APP before running proposal edit the proposal and enter payment block for line item or vendor
Assign points if useful

Similar Messages

  • Display 2 internal tables as 2 ALV-lists..

    Hi
      I have 2 internal tables itab1 and itab2. I have to display the contents of these internal tables as 2 different ALV lists in the same screen..Please help me with steps and if we have to use module pool kindly hep me with the code that has to be included in the PBO and PAI blocks.
    Thanks.

    hi,
    u can use block ALV like,
    TYPE-POOLS : slis.
    TABLES : mara,
             makt.
    SELECT-OPTIONS : mat FOR mara-matnr.
    DATA : BEGIN OF itab OCCURS 0,
            matnr LIKE mara-matnr,
            maktx LIKE makt-maktx,
            matkl LIKE mara-matkl,
            mtart LIKE mara-mtart,
           END OF itab.
    DATA : BEGIN OF itab1 OCCURS 0,
            mtart LIKE mara-mtart,
            count TYPE i,
           END OF itab1.
    DATA : BEGIN OF itab1_col OCCURS 0,
            mtart LIKE mara-mtart,
            count TYPE i,
           END OF itab1_col.
    DATA : t_fcat1 TYPE slis_t_fieldcat_alv,
           t_fcat2 TYPE slis_t_fieldcat_alv,
           wa_fcat TYPE slis_fieldcat_alv,
           t_eve TYPE slis_t_event,
           wa_eve TYPE slis_alv_event,
           t_layout TYPE slis_layout_alv.
    DATA : v_repid LIKE sy-repid,
           t_mat LIKE mara-matnr.
    DEFINE create_fcat.
      clear wa_fcat.
      wa_fcat-fieldname = &1.
      wa_fcat-seltext_l = &2.
      wa_fcat-outputlen = &3.
      append wa_fcat to t_fcat1.
    END-OF-DEFINITION.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM dis_data.
    *&      Form  get_data
          text
    FORM get_data.
      SELECT amatnr bmaktx amtart amatkl INTO CORRESPONDING FIELDS OF TABLE itab
      FROM mara AS a INNER JOIN makt AS b ON
      amatnr = bmatnr
      WHERE a~matnr IN mat.
      LOOP AT itab.
        itab1-mtart = itab-mtart.
        itab1-count = 1.
        APPEND itab1.
      ENDLOOP.
      SORT itab1 BY mtart.
      LOOP AT itab1.
        MOVE-CORRESPONDING itab1 TO itab1_col.
        COLLECT itab1_col.
      ENDLOOP.
    ENDFORM.                    "get_data
    *&      Form  dis_data
          text
    FORM dis_data.
      v_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          i_callback_program      = v_repid.
      REFRESH t_fcat1.
      CLEAR t_fcat1.
      REFRESH t_eve.
      wa_eve-name = 'TOP_OF_PAGE'.
      wa_eve-form = 'TOP_OF_PAGE1'.
      APPEND wa_eve TO t_eve.
      create_fcat:
      'MATNR' 'Material' '10',
      'MAKTX' 'Material Description' '40',
      'MTART' 'Type' '10',
      'MATKL' 'Group' '10'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout   = t_layout
          it_fieldcat = t_fcat1
          i_tabname   = 'ITAB'
          it_events   = t_eve
        TABLES
          t_outtab    = itab.
      REFRESH t_fcat1.
      CLEAR t_fcat1.
      REFRESH t_eve.
      wa_eve-name = 'TOP_OF_PAGE'.
      wa_eve-form = 'TOP_OF_PAGE2'.
      APPEND wa_eve TO t_eve.
      create_fcat:
      'MTART' 'Type' '10',
      'COUNT' 'Total' '5'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout   = t_layout
          it_fieldcat = t_fcat1
          i_tabname   = 'ITAB1_COL'
          it_events   = t_eve
        TABLES
          t_outtab    = itab1_col.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    ENDFORM.                    "dis_data
    *&      Form  top_of_page1
          text
    FORM top_of_page1.
      FORMAT COLOR COL_POSITIVE.
      WRITE:/ 'First Block'.
      FORMAT COLOR OFF.
    ENDFORM.                    "top_of_page
    *&      Form  top_of_page2
          text
    FORM top_of_page2.
      FORMAT COLOR COL_NEGATIVE.
      WRITE /5 'Second Block'.
      FORMAT COLOR OFF.
    ENDFORM.                    "top_of_page

  • Call screen in Function Module

    Hi all,
    I want to call a Screen in function module.Is it possible?
    If possible.How can I do that?
    I tried calling a screen from a function module but the PAI module is not getting accessed.
    I am able to see the screen but when I click on the push button the cursor is not entering the PAI.
    I maintained the FCT codes for the push buttons...dont suggest me to do that.
    If anybody know it, please help me.
    Thanks in advance...................
    regards,
    vinil.
    Edited by: vinil kumar aturi on Jul 1, 2009 4:40 PM

    It is possible, not really different than calling from a program. After creating screen from SE80 tcode look at the screen and PBO, PAI blocks.
    If your function module generate a popup screen you must create your gui status in dialog box type. You can also check code in popup_to_confirm fm to make it clear.

  • How to code with tab strip control in se38

    HI masters,
          In SE38 i created tab strips with 4 tabs in selection screen. Each selection screen having 4 or 5 input fields.So whenever user click on first screen he will fill the input on that screen, and based on that fields only he will get information. Each tab is totally differ from other tabs, i mean first tab is orders and second is invoice like that. so there is no connection betwen tabs data. Everything is individual tabs.
         I dont know how to code that.Can you plz help me how to code that? Thanks in advance.Its very urgent.

    To create a tabstrip control area, choose Tabstrip control from the object list in the Screen Painter and
    place it on the screen. Fix the top-left hand corner of the table control area, and then drag the object to
    the required size.
    Assign a name to the tabstrip control in the Object name attribute. You need this name to identify your
    tabstrip control.
    In your ABAP program use the CONTROLS statement to declare an object with the same name. Use
    TABSTRIP as the type.
    The type TABSTRIP is defined in the type pool CXTAB. The field ACTIVETAB contains the function
    code of the tab title of the currently active tabstrip. The other fields are reserved for internal use.
    The default number of tab pages for a tabstrip control is two.
    Technically, tab titles are treated in the same way as pushbuttons. They have a name, a text, a function
    code, and a function type. You enter these in the Name, Text, FctCode and FctType fields of the object
    attributes.
    A tab title can have the function type ' ' (space) or 'P'. If the function type is ' ' (space), the PAI
    processing block is triggered when the user chooses that tab, and the function code of the tab title is
    placed in the command field. If the function type is 'P', the user can scroll between different tab pages of
    the same type without triggering the PAI processing block. For further details, see the following pages.
    If you want your tabstrip control to have more than two pages, you must create further tab titles. To do
    this, choose Pushbutton from the object list in the Screen Painter and place it in the tab title area.
    You must assign a subscreen area to each tab page.
    The subscreen area assigned to a tab page is automatically entered as the Reference object (in the
    Dictionary attributes) for the tab title of that page.
    To assign a subscreen area to one or more tab pages, choose the relevant tab title in the fullscreen
    editor, choose the Subscreen object, and place it on the tab page.
    Alternatively, you can assign a single subscreen area to several tab pages by entering the name of the
    subscreen area directly in the Reference object field of the attributes of the relevant tab pages.
    If you have assigned a different subscreen area to each page element in a tabstrip control, you can
    scroll between the pages locally at the front end.
    To do this, you must send all of the subscreens to the front end when you send the main screen itself. All
    of the tab titles in the tabstrip control must also have function type 'P'.
    Now, when you scroll between the different page elements, there is no communication between the
    presentation server and the application server.
    When the user chooses a function on the screen that triggers PAI processing, the system processes the
    PAI blocks of all of the subscreens as well. This means that all of the field checks are run. In this
    respect, you could regard the tabstrip control as behaving like a single large screen.
    Local scrolling in tabstrip controls is more appropriate for display transactions.
    <b>Screen Painter:</b>
    <b>PROCESS BEFORE OUTPUT.</b>
    CALL SUBSCREEN subarea1
    INCLUDING SY-CPROG '0101'.
    CALL SUBSCREEN subarea2
    INCLUDING SY-CPROG '0102'.
    CALL SUBSCREEN subarea3
    INCLUDING SY-CPROG '0103'.
    <b>PROCESS AFTER INPUT.</b>
    CALL SUBSCREEN subarea1.
    CALL SUBSCREEN subarea2.
    CALL SUBSCREEN subarea3.
    <b>ABAP:
    CONTROLS: my_tab_strip TYPE TABSTRIP.</b>
    To program a tabstrip control to scroll locally at the front end, you must:
    Assign
    a separate subscreen area to each tab page; a subscreen will be sent to each of these
    when the screen is processed.
    Call
    all of the subscreens from the flow logic.
    Assign
    function code type 'P' to all of the tab titles.
    The system hides any page element whose subscreen contains no elements that can be displayed.
    If there are no page elements containing elements that can be displayed, the system hides the entire
    tabstrip control.
    Hope this is helpful, Do reward.

  • Regarding screen flow logic

    The modules that we write either in PBO or PAI block , are called by the run time environment on the basis of user action or whether they are called in a order in which we have written these modules ?

    Thanks Mansoor .
    "Conditional Module Calls  
      Simple module calls are processed in the sequence in which they appear in the screen flow logic. " This statement I found in SAP help link
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm
    So im confused whether the modules are called on the basis of the sequence in which they occur or whether they are called on the basis of user interaction .

  • Reg: set cursor field problem.

    hello guyz,
        In module pool programmming, I need to vaildate entries made by the user in the PAI block. Once the entry is valid, I need to move the cursor to the next input field.
         Is it possible to set the cursor field in the PAI block. Could you please help me out in this issue because as for as I know the set cursor field works only in PBO.
    thanks,
    karthikeyan

    No dont create another screen..
    For validation you might be using chain .. endchain..
    let us say i have a material field and quantity field... i want to validate materil and set the cursor in quantity field.
    chain
    field : material module validate_material
    endchain.
    module validate_material.
    select single * from mara where matnr = material
    if sy-subrc eq 0.
    set cursor field quantity.
    endif.
    endmodule.

  • Regarding field and screen exits

    Hi,
         plz. send me the step-by-step procedure to create Field and Screen exit.

    Screen Exits:
    Screen exits are provided by SAP to allow the programmer to add his own sub screen in the already available standard SAP screen. The standard screen will have a sub screen area defined especially for this purpose. The call to this sub screen will also be present already in the standard code.
    For example, there is an enhancement RVEXAKK1 available for foreign trade transactions.
    As you see in the above screen in screen areas block the calling screen, its number, sub screen area and the called screen with its number are defined. Here the main screen 101 in program SAPMV86E is having a sub screen area ZUSATZ and the screen 100 from program SAPLXAKK will be the sub screen for that area.
    It is mandatory for the called screen to be in a function group that starts with X. Here the function group is XAKK.
    Also, if you see the above enhancement, it also has two FM exits. These two FM exits will be used to pass data to & from the sub screen. These FM calls will be in PBO & PAI modules of the main screen. These FMs are also part of the above said function group.
    And the function group will not have that sub screen 100 defined. The programmer can create his own screen with the number 100(or whatever is called).
    Calling of the sub screen.
    sub screen call     in PBO of main screen 101          this module has the FM exit call
    Sub screen call in PAI block of main screen          this module has FM exit call
    Create the screen 101 in program SAPLXAKK from transaction CMOD.
    Double click here to create the screen
    Once screen creation is done, use the two FM exits present in the enhancement to pass data to the sub screen and get data from the sub screen.
    Field Exits
    1. Field exit was created with CMOD, but is not processed when calling the screen.
       o  Since the field exit is not processed until PAI, an action must be
          triggered on the screen (Return, Save, ...).
       o  Set profile parameter abap/fieldexit to YES and restart the
          system. Setting the profile can be done by a BASIS person.
    o     To check if the parameter is set or not use transaction RZ10.
       o  After activating the function module FIELD_EXIT... and the field
          exit, leave the transaction on whose screen the field exit is to
          be executed. The screen is not generated until the transaction is
          started.
       o  Do not work on different application servers since there may be
          some delay before the field exit is activated.
       o  The profile parameter must be set on all or none of the
          application servers.
       o  If the field exit is to only be active on specific screens, check
          whether you chose the correct program and the correct screen
          number (take care with subscreens).
       o  Using SE51 -> Field list, check that the screen field does have a
          reference to a data element. In the name of the field exit use the
          name of the data element and not the field name.
       o  After transport, field exits are marked as active but will not be
          processed. Tip: First try deactivating the field exit once more
          and then afterwards, activate it again.

  • About table control

    hi e
    I want to search any field from table control.
    means I have table (table control) on output screen and one input/output field.
    There are some records in the table.
    when user will enter one field(of table) in the input/output field on screen, and press 'enter', cursor should go to thet record in the table on screen. 
    thanks

    Hi,
    From your specification it is not very clear as to what exactly you want to search. Will you search based on any fields, or the primary key fields ?
    Well you can search the internal table in the PAI block and then can locate the row in the Table Control.
    For the democode on Table Control have a look at the TCode: ABAPDOCU
    Hope this helps.

  • Making view fields to output fields dynamically

    Hi,
    I have a maintainance view. One of the fields contains a checkbox. If I check the checkbox i want to change input fields of that row to output fields. And if I uncheck the checkbox, the viceversa should happen.
    I tried doing this by calling a module in PAI block. In that module I looped through the screen structure and made screen-input = 0 for the fields I want to make as output fields.
    But I dont get the result.
    Can anyone help me out as how I can do this?
    Thanks,
    Reena

    Hi Prashant,
    I already tried as you said but by giving screen-input = 0 as I want to make the fields as output fields. But it doesn't work. When i debug, I find the function module gets called and screen-input value for fields is set to 0. But I dont see the result in the view.
    I guess that screen-input is getting reset back to 1 after my module is called. So I am not sure if i am calling my module from the right place.
    Here is my PAI block. The code in bold below is where i am calling the module. Is it the right place?
    PROCESS AFTER INPUT.
      MODULE liste_exit_command AT EXIT-COMMAND.
      MODULE liste_before_loop.
      LOOP AT extract.
        MODULE liste_init_workarea.
        CHAIN.
          FIELD v_t5asrmsgmap1s-msgty .
          FIELD v_t5asrmsgmap1s-msgid .
          FIELD v_t5asrmsgmap1s-msgno .
          FIELD v_t5asrmsgmap1s-msgtxt .
          FIELD v_t5asrmsgmap1s-hide_message .
          FIELD v_t5asrmsgmap1s-alt_msgty .
          FIELD v_t5asrmsgmap1s-alt_msgid .
          FIELD v_t5asrmsgmap1s-alt_msgno .
          FIELD v_t5asrmsgmap1s-alt_msgtxt .
          MODULE check_fields_view1s.
          MODULE set_update_flag ON CHAIN-REQUEST.
          MODULE complete_v_t5asrmsgmap1s ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD vim_marked MODULE liste_mark_checkbox.
        CHAIN.
          FIELD v_t5asrmsgmap1s-msgty .
          FIELD v_t5asrmsgmap1s-msgid .
          FIELD v_t5asrmsgmap1s-msgno .
          MODULE liste_update_liste.
        ENDCHAIN.
    <b>    chain.
          FIELD v_t5asrmsgmap1s-hide_message .
          module on_hide_message.
        endchain</b>.
      ENDLOOP.
      MODULE liste_after_loop.
    -Reena

  • ALV Grid using OOP

    Hi Friends,
    Let me know how to handle the event raised by clicking the hotspot of an ALV grid that is placed over one splitter container.
    I am explaining the problem in detail:
    (1) I have to display an ALV grid and when any hotspot of that ALV grid is clicked,
         the row-id should be captured and used to fetch corresponding records from  
         child table (primarykey-foreign key relationship) and the resulting grid should be
         displayed on the same screen at the same time and for any further click, the
         child grid is to be refreshed.
    (2) For this, I have created one custom container, placed one splitter container   having two rows & one column over  it and placed the ALV grids over that by getting the corresponding containers of the splitter.
    (3) Now, when the hotspot is clicked the SY-UCOMM is empty (even it is not entering the PAI block if I do not place the back button). So, I am not able to get the row-id of the clicked row & without that, can't proceed any further.
    (4) Rest of the things are working fine and I have tested that also.
    Please help me out as I am new to this field and started  practicing ABAP just a month back.
    Thanks & Regards
    Aditya P. Srivastava

    Hi Aditya
    Here is the complete for the same,
    <b>Some Prerequisites in terms of screen, custom control & flow logic</b>
    <i>Screen Name: 9000, Custom Container name : CONTAINER.
    flow logic in screen 9000
    PROCESS BEFORE OUTPUT.
      MODULE status_9000.
      MODULE init_9000.
    PROCESS AFTER INPUT.
      MODULE user_command_9000.</i>
    <b>
    Here goes the code,</b>
    REPORT  zkb_2alv_grids.
    DATA: i_t000 TYPE TABLE OF t000,
          w_t000 TYPE t000,
          i_tcurr TYPE TABLE OF tcurr.
    Declaration for all the objects required
    DATA: o_container        TYPE REF TO cl_gui_custom_container,
          o_splitter         TYPE REF TO cl_gui_easy_splitter_container,
          o_container_top    TYPE REF TO cl_gui_container,
          o_container_bottom TYPE REF TO cl_gui_container,
          o_salv_table1      TYPE REF TO cl_salv_table,
          o_salv_table2      TYPE REF TO cl_salv_table,
          o_salv_columns     TYPE REF TO cl_salv_columns_table,
          o_salv_column      TYPE REF TO cl_salv_column_table.
    DATA: o_events TYPE REF TO cl_salv_events_table.
    CLASS lcl_handle_events DEFINITION
    CLASS lcl_handle_events DEFINITION.
      PUBLIC SECTION.
        METHODS: on_link_click
                    FOR EVENT link_click
                        OF cl_salv_events_table
                           IMPORTING row column.
    ENDCLASS. "lcl_handle_events DEFINITION
          CLASS lcl_handle_events IMPLEMENTATION
    CLASS lcl_handle_events IMPLEMENTATION.
      METHOD on_link_click.
        READ TABLE i_t000 INTO w_t000 INDEX row.
        SELECT * FROM tcurr
               INTO TABLE i_tcurr
                    WHERE fcurr = w_t000-mwaer.
        o_salv_table2->refresh( ).
      ENDMETHOD.                    "lcl_handle_events
    ENDCLASS.                    "lcl_handle_events IMPLEMENTATION
    START-OF-SELECTION.
      DATA: event_handler TYPE REF TO lcl_handle_events.
    Select Data
      SELECT * FROM t000 INTO TABLE i_t000.
      CALL SCREEN 9000.
    *&      Module  init_9000  OUTPUT
          text
    MODULE init_9000 OUTPUT.
      DATA: lv_cx_salv_msg        TYPE REF TO cx_salv_msg,
            lw_bal_s_msg          TYPE bal_s_msg.
      IF NOT o_container IS BOUND.
    Create a Custom Control
        CREATE OBJECT o_container
        EXPORTING
          container_name              = 'CONTAINER'
          repid                       = sy-repid
          dynnr                       = '9000'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Create splitter control
        CREATE OBJECT o_splitter
        EXPORTING
          parent            = o_container
          orientation       = 0
          sash_position     = 30
          with_border       = 1
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
    Assign the left and right control that were splitted
        o_container_top  = o_splitter->top_left_container.
        o_container_bottom = o_splitter->bottom_right_container.
      ENDIF. " IF NOT o_container IS BOUND.
      TRY.
          CALL METHOD cl_salv_table=>factory
            EXPORTING
              r_container  = o_container_top
            IMPORTING
              r_salv_table = o_salv_table1
            CHANGING
              t_table      = i_t000.
        CATCH cx_salv_msg INTO lv_cx_salv_msg.
          lv_cx_salv_msg->if_alv_message~get_message(
                                RECEIVING
                                    r_s_msg = lw_bal_s_msg ).
          MESSAGE ID     lw_bal_s_msg-msgid
                  TYPE   lw_bal_s_msg-msgty
                  NUMBER lw_bal_s_msg-msgno
                  WITH   lw_bal_s_msg-msgv1 lw_bal_s_msg-msgv2
                         lw_bal_s_msg-msgv3 lw_bal_s_msg-msgv4.
      ENDTRY.
    Column Settings
      o_salv_columns = o_salv_table1->get_columns( ).
      o_salv_column ?= o_salv_columns->get_column( 'MWAER' ).
      o_salv_column->set_cell_type( 5 ).
      o_events = o_salv_table1->get_event( ).
      CREATE OBJECT event_handler.
      SET HANDLER event_handler->on_link_click FOR o_events.
      TRY.
          CALL METHOD cl_salv_table=>factory
            EXPORTING
              r_container  = o_container_bottom
            IMPORTING
              r_salv_table = o_salv_table2
            CHANGING
              t_table      = i_tcurr.
        CATCH cx_salv_msg INTO lv_cx_salv_msg.
          lv_cx_salv_msg->if_alv_message~get_message(
                                RECEIVING
                                    r_s_msg = lw_bal_s_msg ).
          MESSAGE ID     lw_bal_s_msg-msgid
                  TYPE   lw_bal_s_msg-msgty
                  NUMBER lw_bal_s_msg-msgno
                  WITH   lw_bal_s_msg-msgv1 lw_bal_s_msg-msgv2
                         lw_bal_s_msg-msgv3 lw_bal_s_msg-msgv4.
      ENDTRY.
    Display the ALV Grid
      o_salv_table1->display( ).
      o_salv_table2->display( ).
    ENDMODULE.                 " init_9000  OUTPUT
    *&      Module  user_command_9000  INPUT
          text
    MODULE user_command_9000 INPUT.
      CASE  sy-ucomm .
        WHEN 'BACK' OR 'EXIT' OR 'CANC'.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
    ENDMODULE.                 " user_command_9000  INPUT
    *&      Module  status_9000  OUTPUT
          text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS '9000'.
    ENDMODULE.                 " status_9000  OUTPUT
    Regards
    Kathirvel

  • Tabstrp with single subscreen

    How to create a Tabstrp with 3 tabs with only one subscreen is that possible.

    Hi Selva Kumar,
    First let me tell you that you can use single "subscreen area" for different tabstrips, as well as single "subscreen". But using a single subscreen for each tab is of no use. Any how using single shared subscreen area can be used so that you can open different subscreens with different tabs without assigning different subscreen areas for each tab.
    For your query, following requirements must be met:
    Create a third tab using Pushbutton and drag it to the tabstrip.
    All tab pages share a common subscreen area.
    All tab titles have function code type ' ' (space).
    Code sample:
    PROCESS BEFORE OUTPUT.
    MODULE ..........
    CALL SUBSCREEN subarea INCLUDING SY-CPROG dynnr.
    PROCESS AFTER INPUT.
    CALL SUBSCREEN subarea.
    MODULE.........
    The PBO must contain a module before the subscreen is called, in which you place the name of the subscreen in the corresponding variable. Assign an initial vale to the subscreen variable so that the screen is processed the first time.
    In PAI block, call a module in which the Function code of the ACTIVETAB title is placed in the active tab field of the structure you created with the type TABSTRIP.
    Regards-
    Chirag Keswani

  • Sap script output to pdf

    Hi All,
    I have one report prg wich gives op in sap script.
    I want same output in pdf and have to save on hard disk.
    please suggest me wat procedure i have to follow.
    It's urgent

    A very common requirement for programmers writing ABAP code for printing using SAPScript Forms is to redirect output to a PDF (Adobe Acrobat) file. I struggled for a few days trying to find a solution to this. Though I found quite a few examples on the web, it was difficult figuring out which technique was optimal. This tip is borne out of these struggles.
    This is an example of how to use ABAP code to save output of a print routine using a SAPScript form into PDF format and also display it within the SAP frontend itself. This routine proves extremely useful to provide users the ability to save local copies of output and preview it within the user-friendly Acrobat Reader control, all without leaving the SAP frontend or your program. Since function modules are used, the code is portable and this technique can be used in any other ABAP program as well.
    Two function modules, Z_DS_CREATE_LOCAL_PDF_FILE and Z_DS_CALL_PDF_VIEWER need to be created. I have used a function group called Z5_DS_PDF for this purpose. The function group contains the ABAP objects code for declaration and implementation of a class that encapsulates the Acrobat application functionality. The function group also contains a screen '0901', that epresents our PDF viewer and one PBO and one PAI block for the same screen.
    Note: The following example has been stripped of essential error-handling for the sake of simplicity and the programmer is assumed to possess knowledge of creation of function groups, function modules, screens and SAPScript forms. ABAP objects or custom controls knowledge is not mandatory. Be patient when trying this out and follow all instructions thoroughly. The results will be worth the effort.
    Steps to follow to get this example running:
    1) Create a function group (Example : Z5_DS_PDF)
    2) Define the top include and place the code listed below into it (LZ5_DS_PDFTOP)
    3) Create screen '0901' in function group with three elements:
    a) Pushbutton CLOSE at the top with function code 'CLO' (this is to exit preview screen)
    b) Custom control container (Large- spanning entire screen) named MY_CONTAINER
    c) The customary OK code field called OK_CODE
    Note: The names of the elements should be exactly as described above
    4) Create one output and one input module in the flow logic of screen '0901' for which the code is provided below
    5) Define two function modules with the following signatures:
    a) FUNCTION Z_DS_CREATE_LOCAL_PDF_FILE
    EXPORTING
    REFERENCE(AFILENAME) LIKE RLGRAP-FILENAME
    TABLES
    OTF_LINES STRUCTURE ITCOO
    b) FUNCTION Z_DS_CALL_PDF_VIEWER
    IMPORTING
    VALUE(FILENAME) TYPE STRING
    Code is provided below.
    6) Compile and activate the function group
    7) Create a simple SAPScript form with one page and one window
    8) Define one element in the text for the main window called 'HELLO' and some static text in it
    9) Check and activate the form
    10) Create the example program (Example : Z5_DS_SCRIPT2PDF) with the below code
    11) Run the example
    NOTES: I tested this code in R/3 version 4.6C but it should work in all 4.6 setups. I'm pretty sure some of the ABAP objects code I have used may not work with R/3 4.0 versions and earlier. Also, it works perfectly only when Acrobat Reader is installed on the presentation server. I have checked it with Acrobat versions 4 and 5 but I haven't had the opportunity to check it with Acrobat Reader 6.
    Code
    Code inside top include LZ5_DS_PDFTOP of function group Z5_DS_PDF
    FUNCTION-POOL Z5_DS_PDF.                    "MESSAGE-ID ..
          CLASS CL_GUI_PDF  DEFINITION                                  *
    CLASS CL_GUI_PDF DEFINITION
      INHERITING FROM CL_GUI_CONTROL.
      PUBLIC SECTION.
        TYPES:
          COL_TYPE  TYPE INT4.
        METHODS:
          CONSTRUCTOR
            IMPORTING
              !PARENT            TYPE REF TO CL_GUI_CONTAINER
              VALUE(SHELLSTYLE)  TYPE I OPTIONAL
              VALUE(DISP_MODE)   TYPE I OPTIONAL
              VALUE(LIFE_TIME)   TYPE I OPTIONAL
              VALUE(NAME)        TYPE STRING OPTIONAL
            EXCEPTIONS
              CNTL_ERROR
              CNTL_INSTALL_ERROR.
        METHODS:
          LOADFILE
            IMPORTING
              VALUE(FILENAME) TYPE STRING
            EXCEPTIONS
              FILE_NOT_FOUND.
        METHODS:
          REFRESH.
        METHODS:
          DISPATCH REDEFINITION.
    ENDCLASS.
    DATA: MY_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: MY_PDF TYPE REF TO CL_GUI_PDF.
    data: ok_code like sy-ucomm.
    data: file_name type string.
    custom control class implementation
    CLASS CL_GUI_PDF IMPLEMENTATION.
      METHOD CONSTRUCTOR.
        DATA:
          CTRL_NAME(80) TYPE C.
        IF NOT CL_GUI_OBJECT=>ACTIVEX IS INITIAL.
          CTRL_NAME = '{CA8A9780-280D-11CF-A24D-444553540000}'.
        ELSE.
          RAISE CNTL_ERROR.
        ENDIF.
        CALL METHOD SUPER->CONSTRUCTOR
          EXPORTING
            CLSID        = CTRL_NAME
            SHELLSTYLE   = SHELLSTYLE
            PARENT       = PARENT
            LIFETIME     = LIFE_TIME
            NAME         = NAME
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            OTHERS            = 2.
        CASE SY-SUBRC.
          WHEN 1.
            RAISE CNTL_INSTALL_ERROR.
          WHEN 2.
            RAISE CNTL_ERROR.
        ENDCASE.
        CALL METHOD CL_GUI_CFW=>SUBSCRIBE
          EXPORTING
            REF = ME
            SHELLID = ME->H_CONTROL-SHELLID
          EXCEPTIONS
            OTHERS = 1.
        IF SY-SUBRC NE 0.
          RAISE CNTL_ERROR.
        ENDIF.
      ENDMETHOD.
      METHOD LOADFILE.
        CALL METHOD ME->CALL_METHOD
          EXPORTING
            METHOD = 'LoadFile'
            P_COUNT = 1
            P1      = FILENAME.
      ENDMETHOD.
      METHOD REFRESH.
        CALL METHOD ME->CALL_METHOD
          EXPORTING
            METHOD = 'Refresh'
            P_COUNT = 0.
      ENDMETHOD.
      METHOD DISPATCH.
        CALL METHOD CL_GUI_CFW=>FLUSH.
        IF SY-SUBRC NE 0.
          RAISE CNTL_ERROR.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    End of code for LZ5_DS_PDFTOP
    Code for Function Module Z_DS_CREATE_LOCAL_PDF_FILE
    FUNCTION Z_DS_CREATE_LOCAL_PDF_FILE .
    ""Local interface:
    *"  EXPORTING
    *"     REFERENCE(AFILENAME) LIKE  RLGRAP-FILENAME
    *"  TABLES
    *"      OTF_LINES STRUCTURE  ITCOO
      DATA: PDF_LINES
      LIKE TLINE OCCURS 1000 WITH HEADER LINE,
       ARCH LIKE TOA_DARA, NO_LINES TYPE I.
      CALL FUNCTION 'CONVERT_OTF'
           EXPORTING
                FORMAT       = 'PDF'
           IMPORTING
                BIN_FILESIZE = NO_LINES
           TABLES
                OTF          = OTF_LINES
                LINES        = PDF_LINES.
      CALL FUNCTION 'DOWNLOAD'
           EXPORTING
                BIN_FILESIZE = NO_LINES
                FILENAME     = 'c:test.pdf'
                FILETYPE     = 'BIN'
           IMPORTING
                ACT_FILENAME = AFILENAME
           TABLES
                DATA_TAB     = PDF_LINES.
    ENDFUNCTION.
    End of Code for Z_DS_CREATE_LOCAL_PDF_FILE
    Code for Function Module Z_DS_CALL_PDF_VIEWER
    FUNCTION Z_DS_CALL_PDF_VIEWER .
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(FILENAME) TYPE  STRING
      FILE_NAME = FILENAME.
      IF MY_CONTAINER IS INITIAL.
        CREATE OBJECT MY_CONTAINER
                  EXPORTING
                   CONTAINER_NAME              = 'MY_CONTAINER'.
        CREATE OBJECT MY_PDF
        EXPORTING
            NAME = 'MY_PDF'
            PARENT = MY_CONTAINER.
      ENDIF.
      CALL SCREEN 901. " Ensure screen is created as per instructions
    ENDFUNCTION.
    End of Code for Z_DS_CALL_PDF_VIEWER
    Flow Logic for screen '0901'
    PROCESS BEFORE OUTPUT.
      MODULE INIT.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_0901.
    End of Flow Logic for screen '0901'
    PBO module INIT for screen '0901'
    MODULE init OUTPUT.
        call method my_pdf->loadfile
              exporting filename = file_name.
    ENDMODULE.                 " init  OUTPUT
    End of PBO module INIT for screen '0901'
    PAI module USER_COMMAND_901 for screen '0901'
    MODULE USER_COMMAND_0901 INPUT.
    case ok_code.
    when 'CLO'.
       set screen 0.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0901  INPUT
    End of PAI module USER_COMMAND_901 for screen '0901'
    Example program Z5_DS_SCRIPT2PDF
    *& Report  Z5_DS_SCRIPT2PDF                                            *
    *& This report works only if the function modules                      *
    *& Z_DS_CREATE_LOCAL_PDF_FILE and Z_DS_CALL_PDF_VIEWER already exist   *
    *& Also use an already existing simple SAPScript Form that contains a  *
    *& window "MAIN" and rework printing code if necessary, remember to    *
    *& change the output device name in OPTIONS-TDDEST                     *
    REPORT  Z5_DS_SCRIPT2PDF.
    PARAMETERS: FORM LIKE RSSCF-TDFORM DEFAULT 'Z5_DS_HELLO2'. "your form
    DATA: OTF_LINES LIKE ITCOO OCCURS 1000 WITH HEADER LINE,
          OPTIONS TYPE ITCPO, FILENAME LIKE RLGRAP-FILENAME,
          FILENAME_S TYPE STRING.
    START-OF-SELECTION.
      OPTIONS-TDDEST = 'LP01'.
    Replace 'LP01' above with your default output device
      OPTIONS-TDCOPIES = 1.
      OPTIONS-TDGETOTF = 'X'. " the key to returning OTF data
    Open the SapScript Form with the name "form"                         *
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                FORM         = FORM    " name of form (SE71)
                OPTIONS      = OPTIONS
                DIALOG       = ' '.
    Execute the element "HELLO" in window MAIN
    - Nothing happens if /E HELLO is not declared in MAIN
      CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                ELEMENT = 'HELLO'  "execute element /E HELLO
                TYPE    = 'BODY'. "normal output
    Close the current SapScript Form
      CALL FUNCTION 'CLOSE_FORM'
           TABLES
                 OTFDATA      = OTF_LINES. " Retrieve all the OTF so far
    Code for PDF Formatting and creation of local File
      CALL FUNCTION 'Z_DS_CREATE_LOCAL_PDF_FILE'
           IMPORTING
                AFILENAME = FILENAME
           TABLES
                OTF_LINES = OTF_LINES.
      FILENAME_S = FILENAME.
    Code to launch Adobe Acrobat inplace in SAPGUI
      CALL FUNCTION 'Z_DS_CALL_PDF_VIEWER'
           EXPORTING
                FILENAME = FILENAME_S.
    End of example program Z5_DS_SCRIPT2PDF

  • Module Pool and Smart Form

    Can anybody Provide me good step by step procedure for module pool and smart for programming with screenshot.
    my email Id is [email protected]

    Hi,
    A module pool is a collection of screens, flow logic, menu bars and ABAP code that you use to build an application. Typically the transaction code that calls the application will refer to the module pool and the initial screen number.
    -->What are the requirements a dialog program must fulfill ?
    • A dialog program must fulfill the following requirements
    . a user friendly user interface
    . format and consistency checks for the data entered by the user
    . easy correction of input errors
    . access to data by storing it in the database.
    What are the basic components of dialog program ?
    • Screens (Dynpros)
    Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of a screen and its flow logic and controls exactly one dialog step.
    • ABAP/4 module pool
    Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules.
    What is a dynpro ? What are its components ?
    • A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly
    one dialog step.
    - The different components of the dynpro are:
    Flow logic: Calls of the ABAP/4 modules for a screen
    Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen
    Screen attributes: Number of the screen, number of the subsequent screen, and others
    Field attributes: Definition of the attributes of the individual fields on a screen
    What is screen flow logic? What are the selections in it? Explain PAI and PBO?
    Ans - Screen flow logic contains the procedural part of a screen. The screen flow logic is like an ABAP program in that it serves as a container for processing blocks. There are four event blocks, each of which is introduced with the screen keyword PROCESS:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    PROCESS ON HELP-REQUEST.
    PROCESS ON VALUE-REQUEST.
    Selections are performed in PAI.
    PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.
    PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI.
    processing, the system either calls the next screen or carries on processing at the point from which the screen was called.
    PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered when the user requests field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.
    step by step process of dialog programing:
    Firstly, you can go to Tcode SE80 and here create a package.
    On that package name right click and select program.
    Then choose program type modulepool program.
    Similarly, you can create screen and then select layout and drag and drop labels and pushbuttons as per your requirements.. Then double click on th push buttons.You will see property window and there we will find FCTCODE and there type the names e.g suppose you want to
    display then typy on the fctcode Display or any name as you wish.
    After that save and activate it. and then close the window.
    And then go back to the intial screen .
    And then click Flow logic button and then uncomment the statement
    module status_1000 PBO block and then doible click on status_1000
    save and activate and then go back and then PAI block uncomment the statement module status_1000 and the dobule click on status_1000.
    step by step process of creating smartforms:
    1.        What is Smartforms?
    Smartforms is a tool to create and maintain forms for mass printing in SAP Systems. Just like sapscripts, for Smart
    forms print program is used to create the output internal table which in turn is thrown to the smart form where the
    field values are displayed. The output medium for Smartforms support printer, fax, e-mail, or the Internet.
    Transaction Code: SMARTFORMS
    To print a form the program for the data retrieval and a Smartform that contains the entire form logic is required. As
    these two are separate one should adapt the Smartform if changes to the form logic are necessary. The application
    program passes the data via a function module interface to the Smartform. When activating the Smartform the system
    automatically generates the function module.
    The architecture of the smart form is given below:
    Creating Forms Using SAP Smart Forms
    When creating a form one must:
    1.      Retrieve the application data
    2.      Describe the form
    3.      Pass the application data to the form
    Example: Create Smartform for printing Purchase order.
    Retrieving the application data (Purchase Order information):
    Write an ABAP program (Print Program) to retrieve data or include a retrieval routine into the application. This
    code consists of statements that select data from databases according to certain selection criteria. Store the
    retrieved data in internal tables, structures or variables and transfer it to the form in one step.
    SAP has already provided with the Print Program (/SMB40/FM06P) for Purchase Order. Based on the business
    requirement, this Print Program can be copied and modified to get the required data and transfer to Smartform.
    Describing the Form:
    The user defines the form using a Smartform. Use the tools of the form builder as listed below:
    1.        Use the form painter to position the windows, graphics and addresses on a page.
    2.        Use the PC editor to write the texts.
    3.        Use the table painter to format the tables.
    The flow control is used to print the pages and elements.
    Form Logic (Introduction)
    In the form builder one can describe a Smartform by a set of nodes. To do this, one can build up a tree structure on
    the left side of the user interface.
    The node global settings and its three successors form attributes, form interface and global definitions always exists
    for any newly created forms.
    To describe the form logic, create the hierarchy under the node pages and windows.
    The following rules apply to control the flow of the form output.
    1.        The nodes in the tree structure are processed from top to bottom.
    2.        For each node there is a tab, this can be used to link the node to a condition. If the condition is true, the
    system processes the node. If not, it skips the node and all its successors.
    3.        One should define a next page for each page.
    The SAP form builder of the smart form consists of:
    1.        Form painter for creating the layout of the form
    2.        PC Editor for entering texts and fields into output areas
    3.        Navigation tree for maintaining the form logic
    4.        Table painter for creating templates and tables
    To define the text formats, one can use the Smart Styles.
    Style builder:
    On the left of the style builder screen consists of the predetermined nodes (header data, folder for paragraph
    formats, and folder for character formats).
    On the right one can see the maintenance screen with its tab pages. At the bottom the preview of the selected font
    can be viewed.
    Create Purchase Order Smartform
    Create a Smartform, copy the existing SAP provided purchase order Smartform to ZSFM_PURCHASEORDER for
    customizing as per business requirement.
    1. Form Settings under Global Settings node, set the parameters in Output Option:
    Page Format: Letter
    Character per Inch: 20
    Line per Inch: 6
    Style: ZSTM_SMB40_SF
    Output Format: Standard Output
    2.        Form Interface
    We can add parameters in the Import Parameters and tables in Tables tab of the form interface for the application
    data to be available for the Smartform to print.
    3. In Global definition we can define the all the global variables which can be used in Smartforms. Initialization
    can be used for initializing the variables and even for retrieving the data.
    Creating pages:
    Each form consists of one or more pages. The first page in the tree structure is the start page and the
    processing of the form starts with this page itself.
    1.        Open the context menu for existing page node and choose create®page
    2.        Enter a unique name (FIRST) for the node and a description (Page)
    3.        Determine the format (1, 2, 3...)and the mode of the page counter (Increase counter) on the general
    attributes tab
    4.        Determine the print attributes (Portrait Format) of the page on the output options
    5.        Determine a background graphic for the entire page on the background tab (Not used in PO).
    Creating windows:
    The size and position of the window can be graphically set in the form painter. There are main windows and
    secondary windows. The difference between these two is that the output in a main window can cover several
    pages.
    1.        Open the context menu for an existing page node and choose®window
    2.        Enter a name for the node (NAMEFORM) and a description (Title Window).
    3.        On the general attributes indicate type of window. NAMEFORM is secondary window.
    In similar fashion all the other windows are created and positioned as per the form design. Only one MAIN
    window is created, it is used for line items which can cover several pages.
    Positioning texts on the form
    The texts are displayed in the form using text nodes. The only exceptions are addresses.
    The predecessor node of the text node determines its use:
    Predecessor node        Used to
    Secondary window        Position text on one or more pages
    Main window        Display text in relation to other nodes in the main window, it may cover several pages
    Template         Displays texts for table cells of a static table
    Table        Display table contents
    There are three text types:
    1.        Text element : to enter new text in the PC editor
    2.        Text module : to include a text module
    3.        Include text : to include an existing SAPscript text
    Entering texts in PC editor: (TITLE)
    ·        To create a text node call the context menu for that node in the tree structure that should receive the
    text, then choose->text
    ·        Enter a unique name (TITLE) for the node and the node description (TITLE)
    ·        On the general attributes tab choose text element as text type
    ·        In the text node box choose whether the text should be started with a new paragraph or only in a new
    line
    ·        Enter the text in the PC editor. Text could be a program element like &Title& or ‘Purchase Order’. &Title&
    is a variable for which the value is assigned in Program line before the text.
    Including text modules: (TERMSCONDITION)
    Text module of the text node is used to refer to an existing text module in the system. The text modules can be
    used in two ways:
    ·        To create a text node, call the context menu for that node in the tree structure that shall contain the text
    and choose create->text under the window TERMSCONDITION.
    ·        Enter a unique name for the node (TERMSCONDITION) and a description (Terms and Condition)
    ·        On the general attributes tab select the text type text module
    ·        Enter the name of the text module in the text name field (&G_TERMS_TEXT&). &G_TERMS_TEXT& is
    used to determine the Text name dynamically in the program lines preceding the text module node.
    ·        Program Lines: GETTERMSCONDITION
    Concatenate 'ZTMM_PO_TERMS_' ZXEKKO-BUKRS
                                      INTO G_TERMS_TEXT.
    Including SAPscript texts: (HD_TXT_F01 – Order Header Text)
    The text type include text node to refer to a SAPscript text, which already exists in the system. To identify the
    text the text name, object, id and the language is needed.
    ·        To create the text node, call the context menu for that node in the tree structure that shall receive the
    text and choose create -> text under the main window.
    ·        Enter a unique name (HD_TXT_F01) for the node and the node description (Order Header Text).
    ·        On the general attributes tab choose include text as text type
    ·        Text Name - &ZEKKO-EBELN&, Text Object – EKKO, Text ID – F01, Language - &SY-LANGU&. Also check
    mark – No error if no text exists.
    Tip: Since the size of text is not known, its better to have the text in MAIN window, so that it can run to more
    than one page if required.
    Inserting addresses: (SENDER): 
    Address node is used to insert an address into the form. This guarantees that the address is formatted
    according to the postal rules of the sender country.
    ·        To create an address node , call the context menu for that node in the tree structure that one wants to
    contain the text and choose create->Address
    ·        Enter a name for the node (COMPANY_CODE_ADDRESS)  and a description (Company Code Address)
    ·        Determine the address type (Organization Address) on the general attributes tab
    ·        For organizational addresses - specify the address number, for any other - specify the person number
    and the address number. In this case we get the company code address into variable &ADDNR&, so we need
    program lines (SENDER) preceding the address text.
    ·        In the box additional addresses, attributes to specify how to display the address are maintained.
    Printing graphics: (LOGO):
    Tcode SE78 is used to import graphics into the SAP system. The transaction imports the graphics and stores it
    in the BDS (business transaction server) and then it can be displayed in the form.
    ·        To create the graphic node , call the context menu for that node in the tree structure and choose create-
    >graphic
    ·        Enter a name (LOGO) for the node and the description (Logo Graphic)
    ·        On the general attributes determine whether a colored or a black and white
    ·        On General Attributes use the fields object - GRPAHIC, id – BMAP and name - &G_LOGO& to identify the
    graphic. &G_LOGO& is variable and therefore we can print company code specific logo. Program line preceding
    the graphic is required.
    ·        Program line COMP_LOGO is used to assign the value to G_LOGO. Concatenate 'ZCOMPANY_LOGO_'
    ZXEKKO-BUKRS INTO G_LOGO. So, the name of graphic for example will be ZCOMPANY_LOGO_0202 for
    company code 0202.
    Displaying a static table (Window – INFO, Template - TEM_INFO) 
    Use node type template to display a table whose layout and size is determined before the runtime of the print
    program.
    To create a template, define a table layout to determine the cell structure for each line. The cells are used to
    display the cell structure for each line. The cells are used to display the contents of the successor nodes of the
    template node. 
    ·        Create Template under the INFO window node. Create > Template.
    The template layout is used to determine the following,
    1.        The number of lines and cells
    2.        The height of each cell
    3.        The width of each cell
    4.        The alignment of the table in the window
    5.        Whether and where to display separator lines or frames
    Use the table control on the template tab to define the layout of the lines. Each line of the template must have
    a definition.
    Use the pattern box to select the desired table pattern.
    Displaying contents in cells: (TLE_CONTACT)
    The template node defines the table layout. The successor nodes of the template         determine the data to be
    displayed in the table cells.
    In General Attributes choose Text type – Text Element. In editor, type ‘DTE         Contact’.
    In Output Options, define the output structure LINE – 5 and Column – 1.
    Similarly all other information for each cell can be filed using the text module and         address module.
    Displaying Dynamic Table (ITEM_TABLE)
    ·        Create TABLE under the MAIN window node. In DATA Tab, loop through the data internal table.
    L_XEKPO is the item table which has all the line item details.
    Define the line types based on the positioning of the text in main window. For         example: TABLE_HEADER1
    is used for positioning Header texts in the table.
    ·        Table is divided into three parts: Header, Main Area and Footer.
    ·        Header is used for printing the Header Title of the table and it at the start of the table on every page.
    ·         Main Area is used to print the line item details of the PO. Create a line (ITEM_DETAIL) of the line type
    TABLE_HEADER1. It will dynamically generate number cells based on the line type defined in the table layout.
    Name all the cells as per the usage. For each cell create the text node to display the information. For example:
    Cell VAL_MATERIAL, Text node MATNR is created which has text element - -matnr.
    ·        Footer is used for printing the information after Main Area data is printed. This can be used for Total
    printing or any other information which needs to be printed after all line items are printed. Create line
    TLE_CONTR_STP for Contractual Stipulation of the line type – LINE which has only one column. Create the
    text element to print the information.
    Special Requirement: Printing the Acknowledgement text if the order value is greater then USD 50,000.00 on
    the second copy only.
    ·        This requirement needs the modification in the print program and the Smartform.
    ·        Modification in Print Program to trigger the second copy if the order value is greater then 50K. Its
    advisable to copy the standard print program to custom Z program (Z_SMB40_FM06P), and changes should
    be made to Z program. Number of copies is passed from NAST to ls_composer_param-tdcopies in Smartforms.
    The value ls_composer_param-tdcopies is modified in the print program to 2 if the order value is greater then
    50K.
    ·        The printing of Acknowledgement Text only on second copy is achieved using the COPIES WINDOW in
    Smartforms. Define Window ACKN_COPY of the type COPIES WINDOW and Output to – Only Copies – Copies
    Differ. Also set the condition in the Condition Tab of the window – SFSY-JOBPAGES = 1, so that it only print
    on the first page of the copy.
    ·        If user selects to print 2 copies and the order value is more then 50k, program needs to print 2 sets
    meaning 4 copies. So number of copies is taken care of in Print program but again the printing of
    Acknowledgement Text should be only the Even number copy meaning Copy# 2 and 4. This achieved by using
    the program lines to determine the even copy.  SFSY-COPYCOUNT will tell us the current copy number being
    printed.
    regards,
    vineela.
    Edited by: Radha Vineela Aepuru on Mar 13, 2008 11:12 AM

  • Credit block of ship-to-party

    Hi thr,
    I have this strange problem where a credit block is coming up on Ship-to. This custoemr has account grp as 0002 which is an exclusive ship-to and when I use VA01 and try to create a sales order and first input ship-to it says order receipt/delivery not possible, credit customer blocked. But when entered along with sold-to all is good. There is no credit data maninatied for thus ship-to, so how is the error coming up?
    Thanks very much !!

    I assume when you enter the ship-to party, the system checks only at the company code(and to credit control area) level. Normally at the company code level, the credit limit may be maintained at for example $1.00. When you enter the sold-to party number, the system finds the payer number and then for this payer it finds the corresponding credit limit through FD32 record. If the limit does not exceed, then this will not block. It looks this is what happening in your scenario.
    Just check any payer is added in the ship-to party customer master record. If not, add, then re-test.
    Regards,

  • Sales order credit block - No credit master data maintain

    Hi ,
    I have a sales order blocked for credit check. But i have not maintain any credit master data for this customer. Customer and payer is same.
    I want to know why credit check is carried out for this customer and what basis system carry out credit check ?
    Pl respond.
    Nitin

    Nitin
    Hope this piece of info could help you in reaching out to come conclusion, in case where you don't carry out any explicit credit check, still system does so...
    Changes Made to Critical Fields
    The credit check is triggered by changes made in the document to values in any of the credit-sensitive fields. According to your Customizing settings, the system runs a check credit between changes or differences in the sales order data against the default values in the customer master record. Examples of such fields are terms of payment and fixed value dates.
    Kalpesh

Maybe you are looking for