Wanted functional module

respected sdn's,
i had requirement of functional module for conversion of created date of vbrk-fkdat into format of 28th november 2006 and country to full name for example in to india like that .
with regards,
vikramreddy t.

For ur case i dont suppose there is a single Fm to get the job but u can create a logic as suggested .
you want this literal after date also .
28<b>th</b>
22<b>nd</b>
1<b>st</b>
3<b>rd</b>
how are u going about this ?
As suggested the logic from table T247 will work for u .
write a case logic as to supplement the literal for the same
case date.
when 1 -- as 'st'
when 2 - as 'nd'
when 3 - as 'rd'
when 4 or 5 or 6 ... as 'th'.
like that .
how are u fetching the country name ? what is your input or avaliable parameters ?
regards,
vijay

Similar Messages

  • Wanted function module

    hai all,
    I want one function module such a way that if i enter the vendor number i must get the vendor name from another client.
    for ex.
    I am using clientNo aaa, user id: yyyyy
    i must get the vendor name from the clint No: bbb, user id: yyyyy
    how to do that.
    thanking u.
    regards,
    giri.

    Hi,
      Creaat a RFC function module and pass the client number to this.
      and in that RFC write the logic.
      select single * from lfa1 where lifnr = <vendor number>.
    and return this record through the export parameter of the RFC.
    call this RFC in one client as.
    call function 'RFCFMNAME' destination 'RFCDESTINATION'.
    Thanks
    Mahesh

  • WANTED: Function Module (Product Allocation Planning Hierarchy Upload Tool)

    Hi,
    I would like to seek assistance in utilizing the <b>right function module</b> in uploading Product Allocation Planning Hierarchy to MC62.
    I've tried direct table update and BDC but to no avial.
    Points will be rewarded.
    Thanks in advance

    Hi,
    I'm having trouble using the FM 'MCP_GET_HIERARCHY'.
      CALL FUNCTION 'MCP_GET_HIERARCHY'
        EXPORTING
          i_gstru             =
    IMPORTING
      RETURN              =
        TABLES
          t_filter            =
          t_char_values       = .
    What do I put in i_gstru, t_filter, and t_char_values?
    I'm very new with this.
    Thanks in advance for the help.

  • Urgent: want function module to translate text into russian language

    Hello All,
    My requirement is that, field is fetched from std. table. This fiels of data type string, i.e., it contains text. I want to translate this text into russian language before displaying this in output. For otr text, i used se63 to translate. But, this text is not otr, it is dynamically fetched from diff. std. tables. So, se63 is not working here.
    Please help me as its very urgent.
    Useful answers will be rewarded.
    Thanks and regards,
    Ashlesha Desai

    Hi
    I don't know if there's an unique solution, you should try to open an OSS message
    All tables with description should have the language (usually field SPRAS) as key fields
    so u can try to read a record and create a new one but with the new language:
    select * from makt where spras = 'ZH'.
       makt-spras = 'E'.
       makt-maktx = ......
       insert makt.
    endselect.
    But it's better to analize the risk
    Max

  • Test case upload in solar02 transaction using function module

    I have requirement to upload test case and test case name in transaction solar02,
    i want functional module name which will ask for project name, business scenarious, business processes
    test case type,  test case , test case name

    Hello Vinod, see the following code (I assume you have a item data on columns A and B as from row 4, and header data on row 2)
        Set rfcctl = CreateObject("sap.functions")
        Set conn = rfcctl.Connection
        conn.Client = "<client>"
        conn.hostname = "<server>"
        conn.user = user "<username>"
        conn.Language = "<lang>"
        conn.password = "<password>"
        conn.SystemNumber = "<system number>"
        If conn.Logon(0, True) Then
           Set rfc = rfcctl.Add("PROCESS_MESS_UPLOAD")
           Set data = rfc.Tables("MSHD").Rows.Add
           item("WERK") = Range("A2").Value
           item("MSCLA") = Range("B2").Value
           item("SEDAT") = Range("C2").Value
           'add all necessary table columns
            i = 4
            While Range("A" & i).Value <> ""
                Set item = rfc.Tables("MSEL").Rows.Add
                item("ATNAM") = Range("A" & i).Value
                item("ATWRT") = Range("B" & i).Value
                'add all necessary table columns
                i = i + 1
            Wend
            If rfc.Call Then
              'CHECK FOR SUCCESS OR ERRORS
            Else
                MsgBox "Call error", vbOKOnly
                Exit Sub
            end if
        Else
            MsgBox "Logon error", vbOKOnly
            Exit Sub
        End If
        Set rfcctl = Nothing
        Set conn = Nothing
    Note: I haven't used this FM before, so I'm guessing which table fields may be useful to you
    Cheers
    Michael

  • Using a function module i want to create another function module

    Hi all,
            My requirement is by using a function module i want to create another function module(if needs modify action should also be done if i need this is for the created function module) and the main thing is that the function module which we are used to create is should be RFC enabled.
    Thanks,
    Vichu.

    Hi,
    You can do one thing... you write the BDC code in the function module name you are creating... so that if you call the function module in a program and execute that program and if you give the function module to be created in the selection screen of the program... in this way there is chance of creating another function module.
    Hope this would help you.
    Good luck
    Narin

  • Wants to find out customise function module in SAP

    Hi all There,
    I want to find out Customize Function Module in SAP,
    I am not able to find out though SE03.
    Pl provide the detail solution
    Regards
    Sagar

    hi,
    Custom function module start with Z or Y.So go to table TFDIR and enter z* and y* on input screen field function module name and then check number on entries by pressing tab number of entries on application toolbar.
    So number of custom function module =  z(number of entries) + y(Number of entries) .
    Thanks
    Mohit

  • CRM : I want a function module which would give me the Sales Org Short

    I have to fetch Sales Organisation Short from the Data base to check whether it is updated or not and i also need the old value in CRMD_ORDER. I need a function module that would get me the Sales Ogansiation Short for the Old Sales Organisation i have. Urgent Please....

    this kind of an authentication is not possible with the linksys SOHO products...it could be possible with the enterprise level products..
    however, you can set up a wireless security on the wireless access point and this requires every user to enter the passcode to connect to the network...here , one problem could be that once connected to the network , the password will be saved on the user's computer...they need not enter the password again...
    the set up you can have is like
    modem -> a wired router -> WAP54GPE 
    the next WAP54GPE will be configured in wireless repeater mode...the number of WAPs will depend on the kinda range you want...the range of a WAP54GPE is around 300 fts....

  • Want to find function module for MB31.

    HY,
    <b>I WANT TO KNOW THE FUNCTION MODULE FOR THE MB31</b>,
    AND WHEN WE ENTER THE PRODUCTION ORDER NO IN THE 1ST SCREEN OF MB31,
    IT GOES TO THE 2ND SCREEN
    HERE WE HAVE TO PUT THE QUALITY,
    <b> WAT I WANT IS THAT:-</b>
    WHEN WE ENTER THE ORDER NO IN CO11 i.e. CREATE PRODUCTION ORDER CONFIRMATION,
    IT ASK FOR THE QUALITIES TO CONFIRM.
    AFTER THIS WHEN WE GO TO MB31 AND PUT IN THE ORDER NO
    ON THE 2ND SCREEN IT ASKS FOR THE QUALITY,
    NOW, I WANT THAT WHEN WE ENTER THE NO OF QUALITIES IN MB31 MORE THAN WE HAVE ENTERED IN CO11, IT SHOULD GIVE AN ERROR MESSAGE.
    <b>POINTS CONFIRMED.</b>
    THANKS IN ADVANCE,
    KARTIKEY.

    Hi,
    Please look at the following thread:
    Re: user exit and customer exit
    If you scroll down, there is a post by Aashish Anchlia which has a useful utility to find a user exit for an SAP transaction. That should help.
    Sudha

  • I want bapi process for bap_goodsmvt_create  function module

    hai this is siva
    i want bapi process for bap_goodsmvt_create  function module,

    Hi ALL,
    I am new to ABAP.
    I have created function module ZMM5 , no syntax error is there.
    but while activating i am getting error,
    PROGRAM SAPLZSKG REPORT / PROGRAM STATEMENT MISSING, OR PROGRAM TYPE IS I ( INCLUDE).
    I WANT TO CHECK THE SYNTAX FOR UNICODE.
    i am not able to check the syntax as i tried by giving FM name, FG name and include name.
    can you please help me.
    Thanks in advance.
    best regards,
    zubera

  • ABAP FRESHER WANT TO KNOW WHAT ARE ALL THE MANDT FUNCTION MODULES

    WHAT ARE THE FUNCTION MODULES WANT TO KNOW AS A ABAP FRESHER, AND WHAT THINGS WANT TO LEARN THAT FUNCTION MODULES  PLEASE GIVE ME SOME BRIEF PROCEDURE.
    Moderator message: I suggest you read the Rules of Engagement of this forum first.
    Edited by: kishan P on Nov 23, 2010 1:45 PM

    Hi jyothi,
    Thanks for your reply.
    I know how to read the text elements, For the FM you said, i have to pass each langu (form t002) for each text element and check if it is maintained in that langu or not.
    that was not my question, i should first know all the langu, so that i can use the READ statement for only those langu to get the texts.
    checking for all the langu causes redundancy is what i feel.
    Regards,
    Sowjanya

  • Want to create a function module  which will convert smartform into PDF .

    Hi All ,
    Requirement : I want to create a function module/report  which will convert smartform into PDF .
    Thanks in advance

    Hi All ,
    zsuresh_test : for converting smartform into pdf.
    when I am excuting this report(zsuresh_test) and by passing the smartform name FOPCR_STANDARD_F1
    I am getting error :
    Incorrect parameter with CALL FUNCTION
    Can you  please help me out..
    REPORT zsuresh_test.
    Variable declarations
    DATA:
    w_form_name TYPE tdsfname VALUE 'FOPCR_STANDARD_F1',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    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.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
    " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    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.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    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.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    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'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_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.

  • I want first day of month any function module is their

    hi i want a function module in that it should return the first day of that month .
    for example if i enter 15.12.2007 it should return 01.12.2007 or 13.06.2007 it should return 01.06.2007

    ähm why would you need a FM for that?
    you probably have a variable whicghs stores your date.
    data:  lv_date    type dats value,
             lv_date2   type dats.
    data: lv_swap    type c length 10.
    concatenate '01' lv_date+2 into lv_swap.
    lv_date2 = lv_swap.
    write lv_date2.

  • Want to change data type CHAR32 to CHAR40 in cutomized function module(CRM)

    Hi Friends,
         I have a requirement to change the data type CHAR32 to char40 .
         Pls guide me how to do it.do I need to change it directly or we have do anymore changes?
    Thx in Adv.
    Baba

    Hello Baba,
    In my opinion the length of a data field has little to do with the ITS and it's templates.  You should be able to change the length for your function module and then the new length should work on the ITS if using the Webgui.  If you have custom templates then maybe you will need to recreate the templates or modify the field length, but this is second to actually changing the datatype length in the R/3 system.
    Edgar

  • How to attached class or function module in FD03

    Hi Guys
    I want to attached CL_ATTACHMENT_LIST for retriving attachment list from fd03 please help to attached the function module in my program?
    regards
    Piroz
    report zfir_aged_debtors no standard page heading
                             line-size 255.
    Type group
    type-pools:
      slis.                        " ALV types
    Tables
    tables:
      adrc,               " Addresses
      bsad,               " Accounting: Customer secondary index (Cleared)
      bsid,               " Accounting: Customer secondary index (Open)
      kna1,               " Customer master: General data
      knkk,               " Customer master: Credit management
      knvk.               " Customer master: Contact persons
    Types
    types:
      begin of ty_bsadbsid,
        bukrs like bsad-bukrs,              " Company code
        kunnr like bsad-kunnr,              " Customer
        gjahr like bsad-gjahr,              " Fiscal year
        belnr like bsad-belnr,              " Accounting document number
        buzei like bsad-buzei,              " Line item
        budat like bsad-budat,              " Posting date
        bldat like bsad-bldat,              " Document date
        waers like bsad-waers,              " Currency
        xblnr like bsad-xblnr,              " Reference
        shkzg like bsad-shkzg,              " Debit/credit indicator
        dmbtr like bsad-dmbtr,              " Amount
        zfbdt like bsad-zfbdt,              " Baseline date for due date
                                            " calculation
        zbd1t like bsad-zbd1t,              " Cash discount days 1
        zbd2t like bsad-zbd2t,              " Cash discount days 2
        zbd3t like bsad-zbd3t,              " Net payment terms period
        rebzg like bsad-rebzg,              " Number of the invoice
        rebzt like bsad-rebzt,              " Follow on document type
      end of ty_bsadbsid,
      ty_it_bsadbsid type ty_bsadbsid occurs 0,
      begin of ty_merged,
        kunnr      like kna1-kunnr,         " Customer number
        name1      like adrc-name1,         " Name
        city1      like adrc-city1,         " City
        post_code1 like adrc-post_code1,    " Post code
        street     like adrc-street,        " Street
        house_num1 like adrc-house_num1,    " House number
        tel_number like adrc-tel_number,    " Telephone number
        fax_number like adrc-fax_number,    " Fax number
        namev      like knvk-namev,         " First name
        namew      like knvk-name1,         " Last name
        telf1      like knvk-telf1,         " Telephone number
        klimk      like knkk-klimk,         " Credit limit
        skfor      like knkk-skfor,         " Total receivables
        total      like bsad-dmbtr,         " Total amount
        rast1      like bsad-dmbtr,         " Amount period 1
        rast2      like bsad-dmbtr,         " Amount period 2
        rast3      like bsad-dmbtr,         " Amount period 3
        rast4      like bsad-dmbtr,         " Amount period 4
        rast5      like bsad-dmbtr,         " Amount period 5
        rast6      like bsad-dmbtr,         " Amount period 6
      end of ty_merged,
      ty_it_merged type ty_merged occurs 0.
    Internal tables
    data:
    Internal table to store customer line items from BSAD and BSID
      it_bsadbsid type ty_it_bsadbsid,
    Internal table to store field catalog for ALV function call
      it_fieldcat type slis_t_fieldcat_alv,
    Internal table to store summarised data for report output
      it_merged   type ty_it_merged.
    Structures
    data:
    Display variant structures
      st_tvariant  like disvariant,
      st_variant   like disvariant.
    Constants
    constants:
      co_delim_dash    type c
                       value '-',
      co_false         type c                      " False
                       value space,
      co_koart_d       like faede-koart            " Customer account type
                       value 'D',
      co_save_u        type c                      " User display variant
                       value 'U',                  " saving allowed.
      co_shkzg_h       like bsid-shkzg             " Debit/Credit indicator
                       value 'H',                  " for credit
      co_shkzg_s       like bsid-shkzg             " Debit/Credit indicator
                       value 'S',                  " for debit
      co_selected      type c                      " Value of selected radio
                       value 'X',                  " button or checkbox
      co_true          type c                      " True
                       value co_selected.
    Variables
    data:
      va_exit          type c.
    Selection screen definition
    selection-screen: begin of block b1 with frame title text-001.
    select-options:
      s_kunnr for bsad-kunnr.                     " Customer number
    parameters:
      p_kkber like knkk-kkber,                    " Credit control area
      p_pafkt like knvk-pafkt,                    " Contact function
      p_datum like sy-datum.                      " Report date
    selection-screen: begin of line,
                      comment 01(30) text-006,
                      position pos_low.
    parameters:
      rastbis1 like rfpdo1-allgrogr               " Due date sorted 1
               default '000',
      rastbis2 like rfpdo1-allgrogr               " Due date sorted 2
               default '000',
      rastbis3 like rfpdo1-allgrogr               " Due date sorted 3
               default '000',
      rastbis4 like rfpdo1-allgrogr               " Due date sorted 4
               default '000',
      rastbis5 like rfpdo1-allgrogr               " Due date sorted 5
               default '000'.
    selection-screen: end of line.
    selection-screen: end of block b1,
                      begin of block b2 with frame title text-002.
    parameters:
      p_varint like disvariant-variant.           " Display variant.
    selection-screen: end of block b2.
    Initialisation
    initialization.
    Provide default periods for due date sorted list.
      rastbis1 = 0.
      rastbis2 = 30.
      rastbis3 = 60.
      rastbis4 = 90.
      rastbis5 = 120.
    Default report date to current.
      p_datum = sy-datlo.
    Default credit control area to BP01.
      p_kkber = 'BP01'.
    At selection screen on value request for
    at selection-screen on value-request for p_varint.
    Provide display variant list for this program.
      call function 'REUSE_ALV_VARIANT_F4'
        exporting
          is_variant = st_variant
          i_save     = co_save_u
        importing
          e_exit     = va_exit
          es_variant = st_tvariant
        exceptions
          not_found  = 2.
      if sy-subrc eq 2.
        message id sy-msgid type 'S'
                number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        if va_exit eq space.
          st_variant = st_tvariant.
          p_varint = st_tvariant-variant.
        endif.
      endif.
    At selection screen
    at selection-screen.
    Load display variant.
      if not p_varint is initial.
        move st_variant to st_tvariant.
        move p_varint to st_tvariant-variant.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
          exporting
            i_save     = co_save_u
          changing
            cs_variant = st_tvariant.
        st_variant = st_tvariant.
      else.
        clear st_variant.
        st_variant-report = sy-repid.
      endif.
      if p_kkber is initial.
      Ensure credit control area is specified.
        message e000(zgen) with 'Credit control area must be specified'.
      endif.
      if p_pafkt is initial.
      Ensure contact person function is specified.
        message e000(zgen) with 'Contact person function must be specified'.
      endif.
    Start of selection
    start-of-selection.
    Extract open customer items from BSID
      select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
             dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
             from  bsid
             into  table it_bsadbsid
             where kunnr in s_kunnr
             and   budat le p_datum.
    Extracct cleared customer items from BSAD
      select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
             dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
             from  bsad
             appending table it_bsadbsid
             where kunnr in s_kunnr
             and   budat le p_datum
             and   augdt ge p_datum.
    Ensure that items were not selected twice while getting data from the
    open and cleared items tables (Only if transaction occured during
    report run).
      sort it_bsadbsid by bukrs belnr gjahr buzei.
      delete adjacent duplicates from it_bsadbsid
             comparing bukrs belnr gjahr buzei.
      if it_bsadbsid[] is initial.
      No data found for selection
        message s001(zgen).
        exit.
      endif.
    Merge data for report output
      perform merge_data tables it_bsadbsid
                                it_merged.
    Build field catalog
      perform build_field_catalog tables it_fieldcat.
    Output report via ALV
      perform output_report_via_alv tables it_fieldcat
                                           it_merged.
    *&      Form  merge_data
          text
    form merge_data  tables   pa_it_bsadbsid type ty_it_bsadbsid
                              pa_it_merged   type ty_it_merged.
    Local work areas
    data:
      lwa_bsadbsid type ty_bsadbsid,
      lwa_merged   type ty_merged.
    Local structures
    data:
      lst_faede    like faede.
    Local variables
    data:
      lva_daysover type i,
      lva_merged_tabix like sy-tabix.
      loop at pa_it_bsadbsid into lwa_bsadbsid.
      Lookup merged entry for customer
        clear lwa_merged.
        read table pa_it_merged into lwa_merged
                                with key kunnr = lwa_bsadbsid-kunnr
                                binary search.
        lva_merged_tabix = sy-tabix.
        if sy-subrc ne 0.
        Create new merged record for customer
          lwa_merged-kunnr = lwa_bsadbsid-kunnr.
        Get customer details from KNA1
          clear kna1.
          select single *
                 from   kna1
                 where  kunnr eq lwa_bsadbsid-kunnr.
        Get customer address details from ADRC
          clear adrc.
          select single *
                 from   adrc
                 where  addrnumber eq kna1-adrnr
                 and    date_from  le p_datum.
          lwa_merged-name1      = adrc-name1.
          lwa_merged-city1      = adrc-city1.
          lwa_merged-post_code1 = adrc-post_code1.
          lwa_merged-street     = adrc-street.
          lwa_merged-house_num1 = adrc-house_num1.
          lwa_merged-tel_number = adrc-tel_number.
          lwa_merged-fax_number = adrc-fax_number.
        Get credit limit details from KNKK
          clear knkk.
          select single *
                 from   knkk
                 where  kunnr eq lwa_bsadbsid-kunnr
                 and    kkber eq p_kkber.
          lwa_merged-klimk = knkk-klimk.
          lwa_merged-skfor = knkk-skfor.
        Get customer contact person details from KNVK
          clear knvk.
          select single *
                 from   knvk
                 where  kunnr eq lwa_bsadbsid-kunnr
                 and    pafkt eq p_pafkt.
          lwa_merged-namev = knvk-namev.
          lwa_merged-namew = knvk-name1.
          lwa_merged-telf1 = knvk-telf1.
          insert lwa_merged into pa_it_merged index lva_merged_tabix.
        endif.
      Interpret debit/credit indicator
        case lwa_bsadbsid-shkzg.
          when co_shkzg_h.
          Credit
            lwa_bsadbsid-dmbtr = 0 - lwa_bsadbsid-dmbtr.
          when co_shkzg_s.
          Debit
        endcase.
      Perform ageing
        clear lst_faede.
        move-corresponding lwa_bsadbsid to lst_faede.
        lst_faede-koart = co_koart_d.
        call function 'DETERMINE_DUE_DATE'
          exporting
            i_faede = lst_faede
          importing
            e_faede = lst_faede
          exceptions
            others  = 1.
        lva_daysover = p_datum - lst_faede-netdt.
      Accumulate total.
        add lwa_bsadbsid-dmbtr to lwa_merged-total.
        if lva_daysover le rastbis1.
          add lwa_bsadbsid-dmbtr to lwa_merged-rast1.
        else.
          if lva_daysover le rastbis2 or
             rastbis3 is initial.
            add lwa_bsadbsid-dmbtr to lwa_merged-rast2.
          else.
            if lva_daysover le rastbis3 or
               rastbis4 is initial.
              add lwa_bsadbsid-dmbtr to lwa_merged-rast3.
            else.
              if lva_daysover le rastbis4 or
                 rastbis5 is initial.
                add lwa_bsadbsid-dmbtr to lwa_merged-rast4.
              else.
                if lva_daysover le rastbis5.
                  add lwa_bsadbsid-dmbtr to lwa_merged-rast5.
                else.
                  add lwa_bsadbsid-dmbtr to lwa_merged-rast6.
                endif.
              endif.
            endif.
          endif.
        endif.
      Update the merged record
        modify pa_it_merged from lwa_merged index lva_merged_tabix.
      endloop.
    endform.                    " merge_data
    *&      Form  build_field_catalog
          text
    form build_field_catalog tables pa_it_fieldcat type slis_t_fieldcat_alv.
    Local work areas
      data:
        lwa_fieldcat   type slis_fieldcat_alv.
    --WG1K903216: Start Insert-
      data: v_datum type datum,
            v_mdmth type datum,
            v_datxt type string,
            v_noday type i.
    --WG1K903216: End Insert---
      refresh pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'KUNNR'.
      lwa_fieldcat-ref_tabname   = 'KNA1'.
      lwa_fieldcat-ref_fieldname = 'KUNNR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '1'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'NAME1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'NAME1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '2'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'CITY1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'CITY1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '3'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'POST_CODE1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'POST_CODE1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '4'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'STREET'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'STREET'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '5'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'HOUSE_NUM1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'HOUSE_NUM1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '6'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'TEL_NUMBER'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'TEL_NUMBER'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '7'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'FAX_NUMBER'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'FAX_NUMBER'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '8'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'NAMEV'.
      lwa_fieldcat-ref_tabname   = 'KNVK'.
      lwa_fieldcat-ref_fieldname = 'NAMEV'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '9'.
      lwa_fieldcat-seltext_l     = 'Contact first name'.
      lwa_fieldcat-seltext_m     = 'Contact Fname'.
      lwa_fieldcat-seltext_s     = 'Ctct Fname'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'NAMEW'.
      lwa_fieldcat-ref_tabname   = 'KNVK'.
      lwa_fieldcat-ref_fieldname = 'NAME1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '10'.
      lwa_fieldcat-seltext_l     = 'Contact last name'.
      lwa_fieldcat-seltext_m     = 'Contact Lname'.
      lwa_fieldcat-seltext_s     = 'Ctxt Lname'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'TELF1'.
      lwa_fieldcat-ref_tabname   = 'KNVK'.
      lwa_fieldcat-ref_fieldname = 'TELF1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '11'.
      lwa_fieldcat-seltext_l     = 'Contact phone no.'.
      lwa_fieldcat-seltext_m     = 'Contact phone'.
      lwa_fieldcat-seltext_s     = 'Ctct Phne'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'KLIMK'.
      lwa_fieldcat-ref_tabname   = 'KNKK'.
      lwa_fieldcat-ref_fieldname = 'KLIMK'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '12'.
      lwa_fieldcat-seltext_l     = 'Credit limit'.
      lwa_fieldcat-seltext_m     = 'Credit limit'.
      lwa_fieldcat-seltext_s     = 'Crdt limit'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'SKFOR'.
      lwa_fieldcat-ref_tabname   = 'KNKK'.
      lwa_fieldcat-ref_fieldname = 'SKFOR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '13'.
      lwa_fieldcat-seltext_l     = 'Credit used'.
      lwa_fieldcat-seltext_m     = 'Credit used'.
      lwa_fieldcat-seltext_s     = 'Crdt used'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'TOTAL'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '14'.
      lwa_fieldcat-seltext_l     = 'Total'.
      lwa_fieldcat-seltext_m     = 'Total'.
      lwa_fieldcat-seltext_s     = 'Total'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST1'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '15'.
    --WG1K903216: Start Delete-
    concatenate '<'
                 rastbis2
                 into lwa_fieldcat-seltext_l
                 separated by space.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis2.
    Always use the middle of the report month as a heading reference date.
      concatenate p_datum+0(6) '15' into v_mdmth.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '+'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST2'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '16'.
    --WG1K903216: Start Delete-
    concatenate rastbis1
                 rastbis2
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis1.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '+'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST3'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '17'.
    --WG1K903216: Start Delete-
    concatenate rastbis2
                 rastbis3
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis2.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST4'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '18'.
    --WG1K903216: Start Delete-
    concatenate rastbis3
                 rastbis4
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis3.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST5'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '19'.
    --WG1K903216: Start Delete-
    concatenate rastbis4
                 rastbis5
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis4.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST6'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '20'.
    --WG1K903216: Start Delete-
    concatenate '>'
                 rastbis5
                 into lwa_fieldcat-seltext_l
                 separated by space.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis5.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due By' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
    endform.                    " build_field_catalog
    *&      Form  output_report_via_alv
          text
    form output_report_via_alv
                        tables pa_it_fieldcat type slis_t_fieldcat_alv
                               pa_it_merged   type ty_it_merged.
    Local variables
      data:
        lva_repid    like sy-repid,
        lva_formname type slis_formname.
      lva_repid = sy-repid.
      lva_formname = 'USER_COMMAND'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program      = lva_repid
          i_callback_user_command = lva_formname
          i_save                  = 'A'
          is_variant              = st_variant
          it_fieldcat             = pa_it_fieldcat[]
        tables
          t_outtab                = pa_it_merged
        exceptions
          program_error           = 1
          others                  = 2.
    endform.                    " output_report_via_alv

    Hi shiva
    Thanks for your help,
    Can you check this coding and revert me back ASAP Please.
    REPORT BDS_GOS_CONNECTION.
    DATA : logical_system LIKE BAPIBDS01-log_system.
           CLASSNAME LIKE BAPIBDS01-CLASSNAME
           OBJKEY LIKE SWOTOBJID-objkey.
    PARAMETERS: pa_lo_sys BAPIBDS01-log_system,
                pa_class like BPIBDS01-CLASSNAME,
                pa_objkey like swotobjidobjkey.
    AT SELECTION-SCREEN.
    CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
             EXPORTING
                  bor_id             = bor_id
             IMPORTING
                  logical_sytem      = pa_lo_sys.
                  classname          = pa_class.
                  objkey            = pa_objkey.
             EXCEPTIONS
                  no_objects_found     = 1
                  internal_error       = 2
                  internal_gos_error   = 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 v_attno1.
    i_object1-typeid = 'BUS2012'.
    i_object1-catid  = 'BO'.
    i_object1-instid = i_yItem-docno.
    call method cl_gos_attachment_query=>count_for_object
       exporting
        is_object = i_object1
        ip_arl    = space
       receiving
        rt_stat   = i_stat1.
    read table i_stat1 into wa_stat1 index 1.
    if sy-subrc eq c_0.
        move wa_stat1-counter to v_attno1.
    endif.             
    CALL METHOD cl_gos_attachment_query=>count_for_object
    EXPORTING
    is_object = object
    ip_arl =    space
    RECEIVING
    rt_stat = lt_stat.
    READ TABLE lt_stat INDEX 1 into ls_stat.
    count = ls_stat-counter.
    *The object has to be a concatenation of your document, like this:
    CONCATENATE object-instid tab-gjahr INTO object-instid.
    ELSE.
    CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
    object-instid.
    ENDIF.

Maybe you are looking for

  • What does it take to run Boot Camp, Fusion or Parallels

    I am wondering about upgrading to Leopard to use Boot Camp, Fusion or Parallels. I have found that a significant amount of software that I want to run is not available in a Mac version. The other issue is that many programs I already have for Windows

  • Dynamically inserting in an internal table with expansion & collapse.

    I have an Internal table wherein I have implemented Expansion and collapse. Now I want to sort this table dynamically everytime a new Child node is added to a Father Node. How do I sort it so that the Child nodes are inserted correctly under their co

  • Women NOT ALLOWED to use my iPhone! Diamond Earrings BEWARE!

    I am soooo upset! I let a girlfriend of mine talk on my iPhone, and today I looked at the screen and there is a NICE LONG SCRATCH on the screen.. where her *diamond earring* was against the screen! That's it.. I am SOOO upset.. I did such a good job

  • Oh no did I AGAIN open my ibook to the hackers?

    I was assisting a Windows CE user on Usenet and posted a handful of screenshots for him. One of my screenshots perhaps gave away my ip to my ibook but I am not sure. This is not the ip address that is reported in Network Info. If serious I can remove

  • Photo Importing from my digital camera

    First off, I LOVE MY MACBOOK - haven't had the mooing and other problems - but I do have a concern - when I download photos from my Canon SuperShot Camera - the MacBook is greatly reducing the size once imported - making it hard to use the photos for