Page layout 360x305 to smartform***very urgent***

Hi,
I want to take print out from dot matrix printer Page size is 360x305.
Can u please help me
how to create and assign page layout to my smart form.
Very urgent.

Go to SPAD transaction.
Click on the Full administration button.
Go to tab Device types.
click on page formats and create a new page format.
Close the thread once your question is answered.
Regards,
SaiRam

Similar Messages

  • How to convert PO sapscript layout to pdf - need VERY URGENT Help

    Dear All,
    Requirement: PO sapscript layout after some modifications (say, ZMEDRUCK) has to be converted to pdf. Through me9f user will be able to give ranges of PO numbers and can view the print preview for the po. After that on clicking the print button we get the printout of the pos one after another based on the user input of PO numbers.
    Our requirement is that when the user will click on the "Print Preview" of po (rather than pressing the print button) it i.e. PO sapscript layout has to get converted to pdf.
    If you have already encountered this scenario, could you please send me the source code regarding this at the earliest. If you want to email it to my personal id, please let me know so that I can give it to you. Thank you.
    It will be very beneficial for mine if you can send me some source code in this regard. (FYI. We want only “Print output” of PO sapscript. So, Print Program /SMB40/FM06P [after copying it to our ZSMB40/FM06P program] need to be modified for downloading the PO into PDF where there is no FMs like OPEN_FORM, WRITE_FORM, CLOSE_FORM. So already available source code in SAP forums can not help me.)). Kindly help me at the earliest. It’s VERY URGENT…
    Thank you.
    Thanks & Regards
    Sudipta

    Hi Chaith,
    Could you please provide me the source code regarding this at the earliest.
    We want only “Print output” of PO sapscript. So we need to modify only the Print Program SAPFM06P after copying it to ZSAPFM06P for downloading of modified PO (ZMEDRUCK) sapscript layout into PDF.
    I am already having some source code from sdn portral. I am attaching it herewith. But it's not working as some constants and variable values need to be given. We want to take download of PO into PDF from ME9F transaction itself.
    Could you please provide necessary values in the missing constants and variables and kindly resend the corrected modified Source code to me so that I can run the same code to  download the modified PO ZMEDRUCK into PDF . Need YOUR URGENT HELP...
    DATA: l_druvo LIKE t166k-druvo,
            l_nast  LIKE nast,
            aux_nast LIKE nast,
            l_from_memory,
            l_doc   TYPE meein_purchase_doc_print,
            ent_screen TYPE c,
            ent_retco TYPE i,
            toa_dara TYPE toa_dara,
            arc_params LIKE arc_params,
            aux_form LIKE tnapr-fonam.
      DATA: otf LIKE itcoo OCCURS 0 WITH HEADER LINE,
            lt_docs      TYPE TABLE OF docs,
            pdf_bytecount TYPE i,
            nom_archivo TYPE string.
      aux_form = 'ZMEDRUCK'.
      l_from_memory = c_true.
      SELECT *
        FROM nast
        INTO aux_nast
        UP TO 1 ROWS
        WHERE kappl = c_po     " Purchase Order
        AND   objky = t_datos-ebeln
        AND   aktiv = space
        ORDER BY erdat DESCENDING eruhr DESCENDING.
      ENDSELECT.
      aux_nast-sort1 = c_swp.
      CLEAR ent_screen.
      CLEAR ent_retco.
      IF aux_nast-aende EQ space.
        l_druvo = c_1.
      ELSE.
        l_druvo = c_2.
      ENDIF.
    l_druvo = '2'.
      CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = aux_nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      CHECK ent_retco EQ 0.
      CALL FUNCTION 'ECP_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = aux_form                            
        IMPORTING
          ex_retco       = ent_retco.
      CLEAR otf.
      CALL FUNCTION 'READ_OTF_FROM_MEMORY'
        EXPORTING
          memory_key   = l_nast-objky  " PO Number
        TABLES
          otf          = otf
        EXCEPTIONS
          memory_empty = 1
          OTHERS       = 2.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize           = pdf_bytecount
        TABLES
          otf                    = otf
          doctab_archive         = lt_docs
          lines                  = pdfout
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
      CONCATENATE c_dest t_datos-ebeln c_ext INTO nom_archivo.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = pdf_bytecount
          filename     = nom_archivo
          filetype     = c_bin
        IMPORTING
          filelength   = pdf_bytecount
        TABLES
          data_tab     = pdfout.

  • How to pass parameters to a page invoked using java script.--- Very Urgent.

    Hello,
    I have an advanced Table in my page. In the first column there is a
    messageChoice. In the second column there is link item.On the link item i have set the following value for destination uri.
    javascript:var a=window.open('OA.jsp?page=/AutoSales/oracle/apps/per/auto/webui/AutoSurrogatesPG&retainAM=Y','a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbar=yes'); a.focus();
    The user selects a value from the message choice and when he clicks on the link item, the value selected from the list should go to the new page invoked using java script as a parameter. I need the value selected from choice to generates few fields in the new page. I have preferred java script because i need the base page and a model window should open. I have tried using setForwardUrl() and setting '_blank' and new window for target frame property on the link item. But it isnt working. The new page is opening in the same window.
    I have also tried putting the value in a session.
    Please help with any kind of suggestions or solutions.
    Thank you.

    Uma,
    You need to
    - Have a PPR Action on the messageChoice (this would trigger a form submit to populate the underlying View Attribute)
    - Either
    - Retrive the value from the View Attribute in the pop-up page (as I could see that you are retaining the AM)
    - Use a SPEL in the link (on the modal page) to use the value from the View Attribute as the parameter value (in the form ${oa.current.<ViewAttributeName>)
    HTH

  • Regarding smartforms very urgent

    Hi All,
    I have created a smartfrom.In that I have converted smartform output to html.Now I am sending this HTML output as an attachment to an email address but here I am unable to add graphic to the HTML ouput.How can I do this.
    Regards,
    shravan

    hi sharavan,
    just try this code, u can get the solution.
    *& Report  ZINV_FORM
    report  zinv_form.
    tables: vbrk,vbrp.
    *TYPES: BEGIN OF t_itab,
          vbeln TYPE vbeln_vf,
          fkdat TYPE fkdat,
          name1 TYPE name1_gp,
          addr  TYPE c.
    *TYPES: END OF t_itab.
    types : begin of ty_binary,
              binary_field(1000) type c,
            end of ty_binary.
    data: g_name_itab type standard table of zinv_name.
    data: g_name_wa  type line of zinv_namet.
    data: g_head_itab type standard table of zinv_str_head.
    data: g_head_wa type line of zinv_ttype_head.
    data: g_item_itab type standard table of zinv_str_item.
    data: g_item_wa type line of zinv_ttype_item.
    data: g_tot_tab type standard table of zinv_str.
    data: g_tot_wa type line of zinv_ttype.
    data: g_pay_tab type standard table of zinv_pay_str.
    data: g_pay_wa  type line of zinv_pay_tab.
    data: l_index type i.
    data: sf_name type  rs38l_fnam.
    data: ssfcrescl type ssfcrescl,
          final_ssfcrescl type ssfcrescl,
          xstring type xstring,
          l_data_tab type standard table of ty_binary,
          tline type table of tline with header line,
          ls_out_opt type ssfcompop,
          filesize type i,
          l_pac_list type standard table of sopcklsti1,
         l_pac_list LIKE sodocchgi1,
         l_docu_data LIKE sodocchgi1-doc_size,
          l_doc_chng type sodocchgi1,
          l_receivers type standard table of somlreci1.
    select-options: s_inv for vbrk-vbeln.
    *PARAMETERS: p_inv LIKE vbrk-vbeln default '90005298'.
    *PARAMETERS: p_email1 LIKE somlreci1-receiver.
    start-of-selection.
      perform get_header.
      perform get_item.
      perform get_name.
      perform call_form.
    PERFORM send_email.
    *&      Form  get_header
          text
    form get_header.
      select vbeln fkdat kunag zterm from vbrk into corresponding fields of table
                                                           g_head_itab where vbeln in s_inv.
      loop at g_head_itab into g_head_wa.
        select zterm text1 spras from t052u into table g_pay_tab where zterm = g_head_wa-zterm
                                                                    and spras = sy-langu.
        l_index = sy-tabix.
        read table g_pay_tab into g_pay_wa index l_index.
        move: g_pay_wa-text1 to g_tot_wa-text1.
        move-corresponding g_head_wa to g_tot_wa.
        append g_tot_wa to g_tot_tab.
      endloop.
    endform.                    "get_header
    *&      Form  get_item
          text
    form get_item.
      select vbeln posnr arktx fkimg netwr mwsbp from vbrp into corresponding fields of table g_item_itab
                                     for all entries in g_head_itab where vbeln eq g_head_itab-vbeln.
      loop at g_head_itab into g_head_wa.
       l_index = sy-tabix.
       g_item_wa-tot = g_item_wa-fkimg * g_item_wa-netwr.
       MODIFY g_item_itab FROM g_item_wa INDEX l_index.
        data: l_tab_item type standard table of zex_struct.
        data: l_wa_item like line of l_tab_item.
        clear l_tab_item[].
        call function 'ZAPR_GET_COND_DETAILS'
          exporting
            i_vbeln                = g_head_wa-vbeln
      I_POSNR                    =
      I_KSCHL                    =
          tables
            export_tab             = l_tab_item.
    EXCEPTIONS
      INCORRECT_INV_NUMBER       = 1
      COND_REC_NOT_FOUND         = 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.
        delete l_tab_item where kschl ne 'PR00'.
        loop at l_tab_item into l_wa_item.
          l_index = sy-tabix.
          move l_wa_item-kbetr to g_item_wa-kbetr.
          modify g_item_itab from g_item_wa transporting kbetr where posnr = l_wa_item-posnr
                                                               and vbeln = g_head_wa-vbeln.
        endloop.
      endloop.
    endform.                    "get_item
    *&      Form  get_name
          text
    form get_name.
      select name1 kunnr from kna1 into corresponding fields of table g_name_itab
                                    for all entries in g_head_itab where kunnr = g_head_itab-kunag.
      if sy-subrc = 0.
        loop at g_name_itab into g_name_wa .
          l_index = sy-tabix.
          call function 'Z_DR_GET_CUSTOMER_ADDRESS'
            exporting
              customerno       = g_name_wa-kunnr
            importing
              customer_city    = g_name_wa-ort01
              customer_street  = g_name_wa-stras
              customer_country = g_name_wa-landx
              customer_zipcode = g_name_wa-pstlz.
          modify  g_name_itab from  g_name_wa index l_index.
        endloop.
        loop at g_name_itab into g_name_wa .
          move-corresponding g_name_wa to g_tot_wa.
          modify g_tot_tab from g_tot_wa
                           transporting ort01 stras landx name1 pstlz where kunag = g_name_wa-kunnr.
        endloop.
      endif.
    endform.                    "get_name
    end-of-selection.
    *&      Form  call_form
          text
    -->  p1        text
    <--  p2        text
    form call_form .
      data:   wa_output type zinv_str,
              gt_header type table of zinv_str_head,
              gt_temp   type table of zinv_str_item,
              wa_header type zinv_str_head,
              l_lines   type i,
              l_tabix   type sy-tabix,
              l_ssfctrlop type ssfctrlop.
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname                 = 'ZINV_FORM1'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       importing
         fm_name                  = sf_name.
    EXCEPTIONS
      NO_FORM                  = 1
      NO_FUNCTION_MODULE       = 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.
    CLEAR g_tot_tab[].
    g_tot_tab[] = gt_output[].
    gt_temp[]   = gt_output[].
    DELETE ADJACENT DUPLICATES FROM gt_header COMPARING order_number.
      describe table g_head_itab lines l_lines.
      gt_temp[] = g_item_itab[].
    l_ssfctrlop-no_dialog = 'X'.
    l_ssfctrlop-preview   = 'X'.
    l_ssfctrlop-getotf    = 'X'.
    ls_out_opt-tdnoprev = 'X'.
    ls_out_opt-tddest = 'locl'.
      loop at g_tot_tab into g_tot_wa.
        g_item_itab[] = gt_temp[].
        delete g_item_itab where vbeln ne g_tot_wa-vbeln.
        loop at g_item_itab into g_item_wa.
          move: sy-tabix to g_item_wa-sino.
          modify g_item_itab from g_item_wa.
        endloop.
        add 1 to l_tabix.
        if l_tabix gt 1 and l_tabix le l_lines.
          l_ssfctrlop-no_open = 'X'.
        endif.
        if l_tabix eq l_lines.
          l_ssfctrlop-no_close = space.
        else.
          l_ssfctrlop-no_close = 'X'.
        endif.
        call function sf_name
         exporting
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
           control_parameters      = l_ssfctrlop
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
         output_options             = ls_out_opt
      USER_SETTINGS              = 'X'
        is_inv_header              = g_tot_wa
       importing
      DOCUMENT_OUTPUT_INFO       =
         job_output_info            = ssfcrescl
      JOB_OUTPUT_OPTIONS         =
          tables
            l_itab                 = g_item_itab
    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.
       APPEND LINES OF ssfcrescl-otfdata TO final_ssfcrescl-otfdata.
      endloop.
      call function 'CONVERT_OTF'
       exporting
         format                      = 'PDF'
      MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
      ASCII_BIDI_VIS2LOG          = ' '
       importing
         bin_filesize                = filesize
         bin_file                    = xstring
        tables
          otf                         = final_ssfcrescl-otfdata
          lines                       = tline
    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.
      call function 'SCMS_XSTRING_TO_BINARY'
        exporting
          buffer                = xstring
        APPEND_TO_TABLE       = ' '
      IMPORTING
        OUTPUT_LENGTH         =
        tables
          binary_tab            = l_data_tab.
      call function 'GUI_DOWNLOAD'
        exporting
        BIN_FILESIZE                    =
          filename                        = 'C:\invoice.pdf'
         filetype                        = 'BIN'
        APPEND                          = ' '
        WRITE_FIELD_SEPARATOR           = ' '
        HEADER                          = '00'
        TRUNC_TRAILING_BLANKS           = ' '
        WRITE_LF                        = 'X'
        COL_SELECT                      = ' '
        COL_SELECT_MASK                 = ' '
        DAT_MODE                        = ' '
        CONFIRM_OVERWRITE               = ' '
        NO_AUTH_CHECK                   = ' '
        CODEPAGE                        = ' '
        IGNORE_CERR                     = ABAP_TRUE
        REPLACEMENT                     = '#'
        WRITE_BOM                       = ' '
        TRUNC_TRAILING_BLANKS_EOL       = 'X'
      IMPORTING
        FILELENGTH                      =
        tables
          data_tab                        = l_data_tab
        FIELDNAMES                      =
      EXCEPTIONS
        FILE_WRITE_ERROR                = 1
        NO_BATCH                        = 2
        GUI_REFUSE_FILETRANSFER         = 3
        INVALID_TYPE                    = 4
        NO_AUTHORITY                    = 5
        UNKNOWN_ERROR                   = 6
        HEADER_NOT_ALLOWED              = 7
        SEPARATOR_NOT_ALLOWED           = 8
        FILESIZE_NOT_ALLOWED            = 9
        HEADER_TOO_LONG                 = 10
        DP_ERROR_CREATE                 = 11
        DP_ERROR_SEND                   = 12
        DP_ERROR_WRITE                  = 13
        UNKNOWN_DP_ERROR                = 14
        ACCESS_DENIED                   = 15
        DP_OUT_OF_MEMORY                = 16
        DISK_FULL                       = 17
        DP_TIMEOUT                      = 18
        FILE_NOT_FOUND                  = 19
        DATAPROVIDER_EXCEPTION          = 20
        CONTROL_FLUSH_ERROR             = 21
        OTHERS                          = 22
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    "call_form
    **&      Form  send_email
          text
    *FORM send_email.
    Document information.
    **wa_doc_chng-obj_name = 'Smartform'.
    **wa_doc_chng-expiry_dat = sy-datum + 10.
    **wa_doc_chng-obj_descr = 'Smart form output'.
    **wa_doc_chng-sensitivty = 'F'. "Functional object
    **wa_doc_chng-doc_size = v_lines_txt * 255.
    **data:i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
         document_data                    = l_doc_chng
      put_in_outbox                       = 'X'
        sender_address                   = sder_add
      sender_address_type                 = 'U'
      commit_work                         = 'X'
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
      SENDER_ID                        =
       TABLES
         packing_list                     = l_pac_list
      OBJECT_HEADER                    =
      CONTENTS_BIN                     =
      CONTENTS_TXT                     =
      CONTENTS_HEX                     =
      OBJECT_PARA                      =
      OBJECT_PARB                      =
         receivers                        = l_receivers
    EXCEPTIONS
      TOO_MANY_RECEIVERS               = 1
      DOCUMENT_NOT_SENT                = 2
      DOCUMENT_TYPE_NOT_EXIST          = 3
      OPERATION_NO_AUTHORIZATION       = 4
      PARAMETER_ERROR                  = 5
      X_ERROR                          = 6
      ENQUEUE_ERROR                    = 7
      OTHERS                           = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *ENDFORM.                    "send_email
    regards,
    seshu.

  • Smartform(very urgent )

    Hi folks,
    i am getting the barcode in my smartform correctly but it is too large in size.
    so, i want to make it small in size. plz tell me , how can i do this??
    correct answers will be rewarded???
    Thanks
    madhu

    hi,
    U can change the size of barcode in SE73 ---> change. select ur barcode and double click on it.u will get barcode symbiology. After selected ur barcode type click ok.then change alignment and give linear height and width.then save in a new request. thats it.
    u can also test ur barcode in EDIT ---> test barcode.
    Thanks,
    Senthil kumar

  • Regarding  new-page print off. warning, its very urgent

    Hi,
    For the below lines:
    1. new-page print off.
    2. new-page print off no-title.
    3. new-page print on parameters print_parms no-title no dialog.
    4. new-page print off no-title.
    In upgrde i am getting 1 warning as
    'NEW-PAGE PRINT  should no longer be used to generate a print dialog'
    what should i write instead of the above 4 lines, to avoid this warning.
    upgrade is from 4.7 to ecc6.0
    please do need ful.
    Thanks,
    Radhika

    Hi ambi,
    1. I just tried, and it works fine.
    2. It does not give any error /warning
       in ECC 5.0
    regards,
    amit m.

  • Space issue in smartform(very urgent)

    Hi ,
    Im printing vendor address in a RFQ. In that i have to print different fields like,
    company name
    address
    city, region postal code
    responsible sales person
    tel no.
    if the "responsible sales person" field is blank then im getting a blank space there and after that tel no. is getting printed .
    The issue is i dnt want that blank space. How to remove that space ?
    Plz help me out.
    thanks in advance,
    Regards,
    Shaheen.

    Hi,
    Tell me one thing... From the output you shown..
    company name
    address
    city, region postal code
    responsible sales person
    tel no.
    Is it the case that only fourth line will be present or absent OR
    is this the case with all the line. ?
    If it is with only fourth line then you can do one thing...
    create two text elements with in the Condition.
    Check for forth line data. If it is empty then print the data in text element only for remaining lines  as...
    company name
    address
    city, region postal code
    tel no
    else (if it is not empty )
    then print the data as you are printing right now i.e.
    company name
    address
    city, region postal code
    responsible sales person
    tel no.
    I think it will work..
    Thanks
    Swati.

  • CODING  EXAMPLE - LAYOUT ALV - ( very urgent )

    Could any body please give me the  coding example
    where slis_layout_alv is used ? Please treat this as very urgent.
                              Yours sincerely,
                               SAURAV  LAHIRY

    Hi Saurav,
    Please check this code.
    REPORT  y56098rdup_list
                    NO STANDARD PAGE HEADING LINE-SIZE 240 LINE-COUNT 65(8) .
    Declartion of Tables.
    TABLES: ztril_logtable,zreasoncodes,zsdcustxref, usr21, adrp.
      TABLES-POOLS
    TYPE-POOLS: slis.
    Internal tables declarations.
    Declaration of output internal table
    DATA: BEGIN OF tb_output OCCURS 0,
            user_id TYPE xubname,                                " Requestor ID
            role TYPE zrole,                                     "Role
            kunnr TYPE kunnr ,                                   "Customer Number 1
            customer_name    TYPE name1,                         "Customer Name
            stras TYPE stras_gp,                                 "Street Address
            ort01 TYPE city,                                     "City
            regio TYPE regio,                                    "State
            pstlz TYPE pstlz,                                    "Postal Code
            land1 TYPE land1_gp,                                 "COUNTRY CODE
            po_box TYPE ad_pobx,                                 "PO Box Number
            tril_po_postal  TYPE zpobox_postal,                  "PO BOX Postal Code
            tril_err_msg TYPE zerr_message,                      "Error Message
            reason_type TYPE zreason_type,                       "Reason Type
            reason_code TYPE zreason_code,                       "Reason Code
            perc_prob TYPE zprobability ,                        "Probability Percentage
            pattern_number TYPE z_pattern_no,                     "Match Pattern Number
            country_code TYPE land1,                             "COUNTRY CODE
            user_id_name(92) TYPE c,                             "UserID + Fast Name + Last Name
            zlkunnr LIKE zsdcustxref-zlkunnr,                    "Legacy Customer NO
            saplegcustno(20) TYPE c,                             "SAP + Legacy Customer No
            reason_desc LIKE zreasoncodes-reason_desc,           "Reason Description
            saplegcustno1(20) TYPE c,
          END OF tb_output.
    Declation of work area.
    DATA: wa_output LIKE tb_output.
    Declaration of Internal Table.
    DATA: tb_fill_output LIKE tb_output OCCURS 0 WITH HEADER LINE,
          wa_fill_output LIKE tb_fill_output.
    Declaration of internal table for ZREASONCODES
    DATA: BEGIN OF tb_reasoncodes OCCURS 0.
            INCLUDE STRUCTURE zreasoncodes.
    DATA: END OF tb_reasoncodes.
    DATA: wa_reasoncodes LIKE tb_reasoncodes.
    Declaration of internal table ZSDCUTXREF.
    DATA: BEGIN OF tb_zsdcustxref OCCURS 0,
            zlkunnr LIKE zsdcustxref-zlkunnr,                      " Legacy Customer No
            zlsourc LIKE zsdcustxref-zlsourc,                      " Legacy customer source code
            kunnr   LIKE zsdcustxref-kunnr,                        " Customer No
          END OF tb_zsdcustxref.
    Declation of work area.
    DATA: wa_zsdcustxref LIKE tb_zsdcustxref.
    Declaration of internal table for USR21.
    DATA: BEGIN OF tb_usr21 OCCURS 0,
           bname      LIKE usr21-bname,                           " USER NAME IN USER MASTER RECORD
           persnumber LIKE usr21-persnumber,                      " PERSON NUMBER
           name_first LIKE adrp-name_first,                       " FIRST NAME
           name_last  LIKE adrp-name_last,                        " LAST NAME
          END OF tb_usr21.
    Declation of work area.
    DATA: wa_usr21 LIKE tb_usr21.
    Declaration of internal table for ADRP.
    DATA: BEGIN OF tb_adrp OCCURS 0,
           persnumber LIKE adrp-persnumber,                       " PERSON NUMBER
           name_first LIKE adrp-name_first,                       " FIRST NAME
           name_last  LIKE adrp-name_last,                        " LAST NAME
          END OF tb_adrp.
    DATA: wa_adrp LIKE tb_adrp.
      Declaration for fieldcatalog
    DATA: tb_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE slis_fieldcat_alv.
      Declaration for events
    DATA: tb_events TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
      Declaration for Layout
    DATA: tb_layout TYPE slis_layout_alv,
          wb_layout TYPE slis_layout_alv.
    DATA: wa_line TYPE slis_listheader,
          tb_list_header TYPE slis_t_listheader.
    DATA:   g_date1(40) TYPE c,
            g_date2(40) TYPE c,
            g_date3(80) TYPE c.
      Declaration for Selection Screen Fields
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_userid FOR ztril_logtable-user_id,                  "Requestor ID
                    s_r_type FOR zreasoncodes-reason_type,                " Reason Type
                    s_r_code FOR zreasoncodes-reason_code
                                                MATCHCODE OBJECT zr_code. " Reason Code
    PARAMETERS    : p_frmdat LIKE ztril_logtable-curr_date OBLIGATORY,     " from date
                    p_to_dat LIKE ztril_logtable-curr_date OBLIGATORY.     " to date
    SELECTION-SCREEN: END OF BLOCK b1.
      Declaration for Varialbes
    DATA: g_sc_no(20) TYPE c,     " To combine the SAP & Legacy Customer No
          g_user_name(92) TYPE c. " To concatnate the Userid and User Name.
    DATA : tb_repid LIKE trdir-name.
    tb_repid = 'Y56098RDUP_LIST'.
    *tb-repid type sy-repid.
    DATA: BEGIN OF tb_user OCCURS 0,
           user_id LIKE ztril_logtable-user_id,
          END OF tb_user.
    To get the P_USERID F4 Functionality for LOW and HIGH.
    AT SELECTION-SCREEN ON  VALUE-REQUEST FOR s_userid-low.
      SELECT user_id FROM ztril_logtable INTO TABLE tb_user.
      SORT tb_user.
      DELETE ADJACENT DUPLICATES FROM tb_user.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'S_USERID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_USERID'
          value_org       = 'S'
        TABLES
          value_tab       = tb_user
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE e210(zsd).
      ENDIF.
    AT SELECTION-SCREEN ON  VALUE-REQUEST FOR s_userid-high.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'S_USERID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_USERID'
          value_org       = 'S'
        TABLES
          value_tab       = tb_user
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE e210(zsd).
      ENDIF.
    At selection screen event.
    AT SELECTION-SCREEN.
    Validation of User_id(USER_ID) & Reason Type(REASON_CODE)
      PERFORM checking_user_id.
    Validation of Reason type from the table ZREASONCODES
      PERFORM check_reasontype.
    Validation of Reason code from the table ZREASONCODES
      PERFORM check_reasoncode.
    Validation for checking From-Date
      PERFORM checking_from_date.
    Validation for checking To-Date
      PERFORM checking_to_date.
    Start of selection event.
    START-OF-SELECTION.
    REFRESH data & clear data.
      PERFORM refresh_tables.
    Get ZTRIL_LOGTABLE Data.
      PERFORM get_tril_logtable.
    Get data from ZREASONCODE.
      PERFORM get_reasoncode_data.
    Get the data Customer No from ZSDCUSTREF based on ZTRIL_LOGTABLE-KUNNR
      PERFORM get_sdcustrefdata.
    Get the data First Name and Last Name
      PERFORM get_data_from_usr21_adrp.
    Updateing the output internal table i.e. IT_OUTPUT  data
      PERFORM fill_output_data.
    Displaying output data with two different Rows.
      PERFORM output_data.
    Populate the field catelog.
      PERFORM build_fieldcatlog.
    Declartion Events.
      PERFORM event_call.
    Top of page Information
      PERFORM top_of_page.
    Declation of Layout
      PERFORM layout USING tb_layout.
    To get the Output Format( Simple List/ ALV )
      PERFORM grid_display.
    *&      Form  get_tril_logtable
          To get the data from table ztril_logtable
    FORM get_tril_logtable.
      REFRESH: tb_output.
    Reading data from the table ZTRIL_LOGTABLE
      SELECT user_id
             role                      "Role
             kunnr                     "Customer Number 1
             customer_name             "Customer Name
             stras                     "Street Address
             ort01                     "City
             regio                     "State
             pstlz                     "Postal Code
             land1                     "COUNTRY CODE
             po_box                    "PO Box Number
             tril_po_postal            "PO BOX Postal Code
             tril_err_msg              "Error Message
             reason_type               "Reason Type
             reason_code               "Reason Code
             perc_prob
             pattern_number
             FROM ztril_logtable INTO
             CORRESPONDING FIELDS OF
             TABLE tb_output
             WHERE
            ( curr_date GE p_frmdat AND curr_date LE p_to_dat )
           ( curr_date BETWEEN  p_frmdat AND  p_to_dat )
             AND
             user_id IN s_userid
             AND reason_code IN s_r_code
             AND reason_type IN s_r_type.
      IF sy-subrc NE 0.
        MESSAGE i202(zsd).
      ENDIF.
    ENDFORM.                    " get_tril_logtable
    *&      Form  get_reasoncode_data
          To get the Reason code and Reason type
    FORM get_reasoncode_data .
    checking internal table initial data.
      IF NOT tb_output[]  IS INITIAL.
        SELECT reason_type
               reason_code
               reason_desc
               FROM zreasoncodes
               INTO CORRESPONDING FIELDS OF TABLE tb_reasoncodes
               WHERE reason_type IN s_r_type
               AND reason_code IN s_r_code.
      ENDIF.
    ENDFORM.                    " get_reasoncode_data
    *&      Form  get_sdcustrefdata
          To get the legasy customer number data
    FORM get_sdcustrefdata .
      IF NOT tb_output[] IS INITIAL.
        SELECT  zlkunnr                      " Legacy Customer No
                zlsourc                      " Legacy customer source code
                kunnr                        " Customer No
                FROM zsdcustxref INTO TABLE tb_zsdcustxref
                FOR ALL ENTRIES IN tb_output
                WHERE kunnr EQ tb_output-kunnr.
      ENDIF.
    ENDFORM.                    " get_sdcustrefdata
    *&      Form  fill_output_data
          To get the final data into the Internal Table
    FORM fill_output_data .
      IF NOT tb_output[] IS INITIAL.
        SORT tb_output BY role user_id.
        LOOP AT tb_output INTO wa_output.
          READ TABLE tb_reasoncodes INTO wa_reasoncodes
                        WITH KEY
                        reason_type = wa_output-reason_type
                        reason_code = wa_output-reason_code BINARY SEARCH.
          IF sy-subrc EQ 0.
            wa_output-reason_desc = wa_reasoncodes-reason_desc.
            CLEAR wa_reasoncodes.
          ENDIF.
          READ TABLE  tb_zsdcustxref INTO wa_zsdcustxref
                                     WITH KEY
                                     kunnr = wa_output-kunnr.
          IF sy-subrc EQ 0.
            CONCATENATE  wa_zsdcustxref-zlkunnr
                         wa_zsdcustxref-zlsourc
                           INTO
                         g_sc_no SEPARATED BY ' - '.
           wa_output-saplegcustno1 = wa_zsdcustxref-zlkunnr.
            wa_output-saplegcustno1 = g_sc_no.
          ELSE.
            wa_output-saplegcustno = wa_output-kunnr.
            CLEAR: wa_reasoncodes,g_sc_no.
          ENDIF.
          READ TABLE tb_usr21 INTO wa_usr21 WITH KEY bname = wa_output-user_id.
          IF sy-subrc EQ 0.
           CONCATENATE wa_usr21-bname
            CONCATENATE   wa_usr21-name_first
                          wa_usr21-name_last
                             INTO
                          g_user_name SEPARATED BY space.
            wa_output-user_id_name = g_user_name.
          ENDIF.
          MODIFY tb_output FROM wa_output
                                TRANSPORTING
                                reason_desc
                                saplegcustno
                                user_id_name
                                saplegcustno1.
          CLEAR: g_user_name,wa_usr21, wa_adrp.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " fill_output_data
    *&      Form  get_data_from_USR21_ADRP
          To get the first name and last name from ADRP table
    FORM get_data_from_usr21_adrp .
      IF NOT tb_output[] IS INITIAL.
        SELECT bname
               persnumber
               FROM usr21
               INTO CORRESPONDING FIELDS OF TABLE tb_usr21
               FOR ALL ENTRIES IN tb_output
               WHERE bname EQ tb_output-user_id.
        IF NOT tb_usr21[] IS INITIAL.
          SELECT persnumber
                 name_first
                 name_last
                 FROM adrp INTO TABLE tb_adrp
                 FOR ALL ENTRIES IN tb_usr21
                 WHERE persnumber EQ tb_usr21-persnumber.
        ENDIF.
      ENDIF.
      LOOP AT tb_usr21 INTO wa_usr21.
        READ TABLE tb_adrp INTO wa_adrp WITH KEY persnumber = wa_usr21-persnumber.
        IF sy-subrc EQ 0.
          wa_usr21-name_first = wa_adrp-name_first.
          wa_usr21-name_last = wa_adrp-name_last.
          CLEAR wa_adrp.
          MODIFY tb_usr21 FROM wa_usr21 TRANSPORTING name_first name_last.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " get_data_from_USR21_ADRP
    *&      Form  build_fieldcatlog
          It is used to build the fieldcatlog
    FORM build_fieldcatlog .
      wa_fieldcat-col_pos = 1.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'USER_ID'.
      wa_fieldcat-seltext_l = 'Requestor ID'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 2.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'USER_ID_NAME'.
      wa_fieldcat-seltext_l = 'Requestor Name'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 3.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'SAPLEGCUSTNO'.
      wa_fieldcat-seltext_l = 'SAP & Legacy Customer No'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 4.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'CUSTOMER_NAME'.
      wa_fieldcat-seltext_m = 'Customer Name'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 5.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'STRAS'.
      wa_fieldcat-seltext_m = 'Street Address'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 6.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'ORT01'.
      wa_fieldcat-seltext_m = 'City'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 7.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REGIO'.
      wa_fieldcat-seltext_m = 'State'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 8.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PSTLZ'.
      wa_fieldcat-seltext_m = 'Postal Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 9.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'LAND1'.
      wa_fieldcat-seltext_m = 'Country Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 10.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PO_BOX'.
      wa_fieldcat-seltext_m = 'PO BOX NO'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 11.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'TRIL_PO_POSTAL'.
      wa_fieldcat-seltext_m = 'PO Box Postal Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 12.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REASON_TYPE'.
      wa_fieldcat-seltext_m = 'Reason Type'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 13.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REASON_CODE'.
      wa_fieldcat-seltext_m = 'Reason Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 14.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REASON_DESC'.
      wa_fieldcat-seltext_m = 'Reason Description'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 15.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PERC_PROB'.
      wa_fieldcat-seltext_m = 'TOP %'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 16.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PATTERN_NUMBER'.
      wa_fieldcat-seltext_m = 'Match Pattern'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      wa_fieldcat-datatype = 'N'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    " build_fieldcatlog
    *&      Form  event_call
         It is used to call the events
    FORM event_call .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = tb_events
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " event_call
    *&      Form  grid_display
          To display the output in ALV Grid  format
    FORM grid_display .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
           i_callback_program                = tb_repid
          i_callback_pf_status_set          = 'SET_PF_STATUS'
           i_callback_user_command           = 'USER_COMMAND'
           i_callback_top_of_page            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
           is_layout                         = wb_layout
           it_fieldcat                       = tb_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
           it_events                         = tb_events
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
         TABLES
          t_outtab                          = tb_output
          t_outtab                          = tb_fill_output
        EXCEPTIONS
          program_error                     = 1
          OTHERS                            = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " grid_display
    *&      Form  top_of_page
          It is used to display the Top-of-page
    FORM top_of_page .
      CLEAR: wa_line, tb_list_header[].
      wa_line-typ = 'H'.
      wa_line-info = 'Duplicates Ignored by Requestor Report'.
      APPEND wa_line TO tb_list_header.
      CLEAR wa_line.
      wa_line-typ = 'S'.
      WRITE p_frmdat TO g_date1 DD/MM/YY.
      WRITE p_to_dat TO g_date2 DD/MM/YY.
      CONCATENATE 'From Date : ' g_date1  '        To Date : ' g_date2
                    INTO g_date3 SEPARATED BY  space .
      wa_line-info = g_date3.
      APPEND wa_line TO tb_list_header.
      CLEAR wa_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = tb_list_header.
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    " top_of_page
    *&      Form  layout
       It is used to display the output layout
    FORM layout  USING    p_tb_layout.
      tb_layout-detail_popup      = 'X'.
      tb_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " layout
    *&      Form  refresh_tables
    TO Refresh the internal table workarea
    FORM refresh_tables .
      REFRESH: tb_output, tb_reasoncodes, tb_zsdcustxref, tb_usr21, tb_fill_output.
      CLEAR: wa_output, wa_reasoncodes, wa_zsdcustxref, wa_usr21, wa_fill_output.
    ENDFORM.                    " refresh_tables
    *&      Form  SET_PF_STATUS
    It is used to populate the PF_STATUS
    FORM set_pf_status USING tb_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTANDARD'.
    ENDFORM.                    " SET_PF_STATUS
    *&      Form  USER_COMMAND
    To avoid the shortdump of ALV Report
    FORM user_command USING rf_ucomm    LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
    ENDFORM.                              "user_command
    *&      Form  check_reasoncode
          Checking Reason Code
    FORM check_reasoncode .
      IF NOT s_r_type IS INITIAL.
        SELECT SINGLE reason_code FROM zreasoncodes INTO s_r_code
                                  WHERE reason_type IN s_r_type
                                  AND reason_code IN s_r_code.
        IF sy-subrc NE 0.
          SET CURSOR FIELD 'S_R_CODE-LOW'.
          MESSAGE e204(zsd).
        ELSEIF s_r_code = 'TP'.
          MESSAGE e208(zsd).
        ENDIF.
      ENDIF.
    ENDFORM.                    " check_reasoncode
    *&      Form  check_reasontype
       Checking Reason Type
    FORM check_reasontype .
      IF s_r_type-low = 'TP' OR
           s_r_type-high = 'TP'.
        MESSAGE e208(zsd).
      ENDIF.
      SELECT SINGLE reason_type FROM zreasoncodes INTO s_r_type
                                 WHERE reason_type IN s_r_type.
      IF sy-subrc NE 0.
        MESSAGE e201(zsd).
      ENDIF.
    ENDFORM.                    " check_reasontype
    *&      Form  checking_From_date
          Checking From Date
    FORM checking_from_date .
      SELECT SINGLE
              curr_date
              FROM ztril_logtable
              INTO ztril_logtable-curr_date
              WHERE curr_date EQ  p_frmdat.
      IF sy-subrc NE 0.
        MESSAGE e205(zsd).
      ENDIF.
    ENDFORM.                    " checking_From_date
    *&      Form  checking_To_date
      Checking To_date
    FORM checking_to_date .
      SELECT SINGLE
               curr_date
               FROM ztril_logtable
               INTO ztril_logtable-curr_date
               WHERE curr_date EQ  p_to_dat.
      IF sy-subrc NE 0.
        MESSAGE e206(zsd).
    elseif p_frmdat lt p_to_dat.
       Message e209(zsd).
      ELSEIF p_frmdat GT p_to_dat.
        MESSAGE e207(zsd).
      ENDIF.
    ENDFORM.                    " checking_To_date
    *&      Form  checking_user_id
          text
    FORM checking_user_id .
      SELECT SINGLE user_id
               FROM ztril_logtable
               INTO s_userid
               WHERE user_id IN s_userid.
      IF sy-subrc NE 0.
        MESSAGE e200(zsd).
      ENDIF.
    ENDFORM.                    " checking_user_id
    *&      Form  output_data
      To print the Legacy customer No and SAP no into two different rows.*
    FORM output_data .
      LOOP AT tb_output INTO wa_output.
        wa_fill_output-user_id = wa_output-user_id.
        wa_fill_output-role = wa_output-role.
        wa_fill_output-saplegcustno = wa_output-kunnr.
        wa_fill_output-user_id_name = wa_output-user_id_name.
        wa_fill_output-customer_name = wa_output-customer_name.
        wa_fill_output-stras = wa_output-stras.
        wa_fill_output-ort01 = wa_output-ort01.
        wa_fill_output-regio = wa_output-regio.
        wa_fill_output-pstlz = wa_output-pstlz.
        wa_fill_output-land1 = wa_output-land1.
        wa_fill_output-po_box = wa_output-po_box.
        wa_fill_output-tril_po_postal = wa_output-tril_po_postal.
        wa_fill_output-tril_err_msg = wa_output-tril_err_msg.
        wa_fill_output-reason_type = wa_output-reason_type.
        wa_fill_output-reason_code = wa_output-reason_code.
        wa_fill_output-country_code = wa_output-country_code.
        wa_fill_output-reason_desc = wa_output-reason_desc.
        wa_fill_output-pattern_number =  wa_output-pattern_number.
        wa_fill_output-perc_prob = wa_output-perc_prob.
        CLEAR:  wa_output-user_id,
                wa_output-role,
                wa_output-kunnr,
                wa_output-user_id_name,
                wa_output-stras,
                wa_output-ort01,
                wa_output-regio,
                wa_output-pstlz,
                wa_output-land1,
                wa_output-po_box,
                wa_output-tril_po_postal,
                wa_output-tril_err_msg,
                wa_output-reason_type,
                wa_output-reason_code,
                wa_output-country_code,
                wa_output-reason_desc,
                wa_output-customer_name,
                wa_output-pattern_number,
                wa_output-perc_prob.
        APPEND wa_fill_output TO tb_fill_output.
        IF NOT wa_output-saplegcustno1 IS INITIAL.
          CLEAR:  wa_fill_output-user_id,
                  wa_fill_output-role,
                  wa_fill_output-kunnr,
                  wa_fill_output-user_id_name,
                  wa_fill_output-stras,
                  wa_fill_output-ort01,
                  wa_fill_output-regio,
                  wa_fill_output-pstlz,
                  wa_fill_output-land1,
                  wa_fill_output-po_box,
                  wa_fill_output-tril_po_postal,
                  wa_fill_output-tril_err_msg,
                  wa_fill_output-reason_type,
                  wa_fill_output-reason_code,
                  wa_fill_output-country_code,
                  wa_fill_output-reason_desc,
                  wa_fill_output-customer_name,
                  wa_fill_output-pattern_number,
                  wa_fill_output-perc_prob.
          wa_fill_output-saplegcustno = wa_output-saplegcustno1.
          APPEND wa_fill_output TO tb_fill_output.
          CLEAR: wa_output.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " output_data

  • Blank PAge when Launching WEB IC from Portal--Very Urgent

    Hi,
    We are using CRM 5.0 EIC scenario
    We have just configured new application server (adding one more to existing servers), when we lauch EIC (interaction centre) from this new server, it shows nothing, it just displays blank page,
    Need very very urgently
    MAx points would be awarded
    R

    In CRM 5.0 does t-code CRM_IC launch the page for you correctly?  if yes then I think you need to have your portal admin check this as it would seem portal related.

  • Very Urgent!!!Calling custom OAF vent reg page from JTT page gives error.

    1. We have a need to customize Oracle Marketing Online Event registration page (Oracle standard JTT page: amsEventRegistrantsEntryMain.jsp - available via function AMS_EVENT_REG_ENTRY) .
    2. We have created a new custom OAF page for the event registration and modified the function definition Web HTML property from "amsEventRegistrantsEntryMain.jsp" to "jtfcrmchrome.jsp?
    page=/oracle/apps/xxamw/xxams/event/webui/XXAmsEventRegScheduleCrePG&akRegionApplicationId=540&jttoijappn=OKL" (tried also with OA.jsp call)
    3. Now when we click on the Register link from the base (This Oracle standard Register link calls AMS_EVENT_REG_ENTRY and since AMS_EVENT_REG_ENTRY is modified we expect OAF page to render) page it throws "You have insufficient privileges for the current operation. Please contact your System Administrator." error. The function is not accessible.
    4. Navigation: Oracle Marketing Super User -> Marketing Online -> Event -> Registration Stb menu -> Search for a "Event Schedule Name" -> Click Go -> Click on Register link (We expect our custom OAF page when register link is
    clicked)
    Please note this design was tested successfully in an instance but when we migrated this to a new instance it fails. We cannot compare two instances since the previous instance no longer exists. Seems some issue with JTT menu straucture since we are using Oracle standard JTT function. This is a very urgent issue and any quick help or pointer will be great.
    Thanks/ Santanu

    Hi,
    R u still facing the issue?
    If So can you please tell me:
    Have u added your called function to the current user? That means by navigating to the responsibility you can access the same page directly, with out doing any transaction? If so then create your custom function with your required URL and attach to a menu ; then check if you are able to view that page from the menu navigation?If these thing is not working then I think you need to create a custom page that will extend the std region , that time hopefully it will work.
    Please post your result/thought!!
    Regards
    Apurba K Saha

  • Very urgent Decimal issue in ADF page

    Hello friends,
    i have an issue in ADF page which was weight field, issue has below.
    1) weight filed was validated that without entering 5 digit value in filed, example suppose i enter 12345 in weight it is showing that in small dialog box -weight value should be 0 to 9999.999 only. but it is let me to go next field and submit button. it is happening only in create page only.
    2)but when i go to detail page , same weight fild is populated there - i enter invalid weight something 12345, it is showing that in small dialog box -weight value should be 0 to 9999.999 only. but here let me not go to another filed until i ENTER valid value.
    create page weight filed need to work same as detail page.i am new to ADF development, how to check where this validation done and how to fix this.
    very very urgent.
    Thanks,
    vamshi.

    If you use ADF BC, open the entity and choose "Business Rules". You can then add validation rules such as range limits under the attributes. It is usually best practice to include validation rules in the entity (model layer), this way they apply automatically to all view objects based on the entity and you are guaranteed to have only valid values in the database. (View layer validation may have its place as a convenience supplement.)
    Read more about business rules in the developer's guide: http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcvalidation.htm

  • Setting max record per page property at runtime (very urgent)

    We need to display 7 record for first page and 25 for other pages...
    we tried a reperating frame max record per page property is a report level property. So it cannot change for pages.
    Then We try other way..
    we seperated our query to the different frame to do these
    But we need to summaries some field at page level and
    reset at page has fallowing restriction
    "A Reset At of Page will not work for reports that have multiple repeating frames associated with a group that is involved in the summary. One common case of this is a matrix report. As a result, matrix reports cannot have page-level summaries."
    So all the ways we tried failed.
    How can we do this ... it is very urgent. (we can use any version of report.)
    Thanks for your help...

    repost

  • Very Urgent.......How to update the database values through OAF pages ??

    Hi All,
    I am developeing some self service application thru Oracle Application Framework(OAF). There I am fetching 5 attributes from the database and displaying those attributes in my main page Table Region. Now my requirement is i want to edit that exising values & again i want to store it in the databse while clicking the update button. so first i have created one VO for fetching the values from the database & i make one Table Region in my main page along with 5 MessageTextInput field.. & i mapped that VO's attributes to my textbox.Now i can able to fetch & display the values inside the text box while rendering the page.
    But I dont know how to update the values in the database. Caz in my VO I have only select query. So anyone plz send me the code for update. And also plz let me know where to insert that code..whether (CO or AM or EO)..it is very urgent.
    Thanks
    srini

    David,
    Note that the default JavaBean datacontrol does not allow create/remove and transaction operations. These apis are not implemented for the JavaBean datacontrol.
    You may re-initialize the rowsetiterator, by calling ((oracle.adf.model.generic.DCRowSetIteratorImpl)iteratorBinding.getRowSetIterator()).clearCurrentData().
    This will force the RSI to refresh it's data via the named-accessor again.

  • Very Urgent Text Modules - Smartform in diff lang

    Hi,
    Could any one give me a detailed info on how to use one text module in Smartform to other languages <b>without logging</b> into the system in that language.
    I <b>tried</b> Example in the  thread containing as below nut unable to succeed.
    /: INCLUDE z_txt OBJECT TEXT ID txt LANGUAGE &Variable&
    Name: z_text
    Object: Text
    Text id: Txt (Text id from SO10)
    Language: variable[/code][/code][/code]
    Its very Urgent
    Thanks
    Dan

    Dan...
    you want to give the Language for Text elemetn dinamically..
    in genaral attributes of the Text Module winodow..
    Text name: xxxxxxx
    Text Object: Text
    Text ID: ST
    Language: as below...
    so wht i am suggesting is give the &CONTROL_PARAMETERS-REPLANGU1& (if it contain the Language)..
    in Language tab.. Press the button right side of this element ">" then the text box will be become large.. then enter &CONTROL_PARAMETERS-REPLANGU1&..
    if it is not clear plese tell wht exactly you r requirement again
    <b>Please Close this thread.. when u r problem ise solved</b>
    Reward if Helpful
    Regards
    Naresh Reddy K

  • Set Page "HEIGHT" ---Very Urgent, Please Help me on this issue. Please.

    Hi all ,
    Very Urgent, Please Help me on this issue.
    when_now_form trigger i set set maximize the window and MDI. And my window and canvas is same height (1500). The formsweb.cfg also changed to 1500. But still I can not view full page on web. Where to I change the properties. Please help.
    Selvam

    Is your form running inside the browser window (with SeparateFrame=False)? If the browser is maximized, and your form is maximized, yet you cannot see the entire screen, you can run with SeparateFrame=True. You can do that on the browser line.

Maybe you are looking for

  • Forms with SQL Server

    hi, Is it possible to connect forms with sql server? if yes, how? Any help will be highly appreciated

  • How to find all JMX ports on a server?

    How to find all jmx ports on particular server (say localhost) on windows I have multiple JVM's running on my local server, and there is extensive use of JXM mbeans by the applications running on each server. So I want to connect to all these JMX ser

  • Can't start Foundation Services on Windows XP, Essbase 11.1.2

    Installation and & configuration were fine and everything worked for a while. Machine was rebooted. After that, I tried : "EPM System Start" from start menu, but it fails starting foundation services. I tried starting only Foundation services ... It

  • FCP X : FCP's folders in a subdirectory on my external hard drive ?

    Hi, I wanted to have my videos and projects for Final Cut Pro X on an external hard drive. I tried with the one I had and it didn't recognize it (apparently because it's used for Time Machine). Anyway, I bought a new one and now FCP recognizes it. Fi

  • 3rd party dropshipment carried out by more than one 3rd party vendor

    Hi I am wondering if the following is possible in standard SAP on a third party drop shipment scenario.. I would like 1200pcs quantity to split up into 3 different shipments (each shipment = 400pcs) and drop ship by three different 3rd party vendors