Skip to Content
0
Former Member
Apr 10, 2008 at 05:16 AM

Get data as FS10N

254 Views

Hi,

I've tried to create a program using function modulo LDB_PROCESS as std. program: RFGLBALANCE. The problem is that the internal table: lt_balance_data is not filled.

Any idea of what else do I need to do to fill this internal table.

Do you know any other way to get the same data as lt_balance_data which contains an account balance in the different currencies?

*&---------------------------------------------------------------------*
*& Report  ZJMPRUEBA
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  zjm_ldb.

START-OF-SELECTION.

  DATA: lt_balance_data  TYPE fdbl_balance_data.

  DATA: lt_params    TYPE STANDARD TABLE OF rsparams WITH HEADER LINE,
        lt_callbacks TYPE STANDARD TABLE OF ldbcb WITH HEADER LINE.

  PERFORM fill_it USING 'SD_BUKRS' 'I' 'EQ' 'OMMA'.
  PERFORM fill_it USING 'SD_SAKNR' 'I' 'EQ' '2030010100'.
  PERFORM fill_it USING 'SD_GJAHR' 'I' 'EQ' '2008'.
  PERFORM fill_it USING 'SD_GSB_S' 'I' 'CP' '*'.
  PERFORM fill_it USING 'SD_CURTP' 'I' 'CP' '10'.
  PERFORM fill_it USING 'SD_RTCUR' 'I' 'CP' '*'.
  PERFORM fill_it USING 'SD_ITUSR' 'I' 'EQ' ''.
  PERFORM fill_it USING 'SD_CURTP' 'I' 'EQ' '10'.


  PERFORM fill_it2 using 'KNC1'.
  PERFORM fill_it2 using 'KNC3'.
  PERFORM fill_it2 using 'LFC1'.
  PERFORM fill_it2 using 'LFC3'.
  PERFORM fill_it2 using 'SKC1C'.

  CALL FUNCTION 'LDB_PROCESS'
    EXPORTING
      ldbname                     = 'SDF'
    TABLES
      callback                    = lt_callbacks
      selections                  = lt_params
    EXCEPTIONS
      ldb_not_reentrant           = 1
      ldb_incorrect               = 2
      ldb_already_running         = 3
      ldb_error                   = 4
      ldb_selections_error        = 5
      ldb_selections_not_accepted = 6
      variant_not_existent        = 7
      variant_obsolete            = 8
      variant_error               = 9
      free_selections_error       = 10
      callback_no_event           = 11
      callback_node_duplicate     = 12
      callback_no_program         = 13
      callback_no_cbform          = 14
      dyn_node_no_type            = 15
      dyn_node_invalid_type       = 16
      OTHERS                      = 17.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

*&---------------------------------------------------------------------*
*&      Form  fill_it
*&---------------------------------------------------------------------*
form fill_it  using    P1
                       P2
                       P3
                       P4.

  lt_params-selname = P1.
  lt_params-sign    = P2.
  lt_params-option  = P3.
  lt_params-low     = P4.
  APPEND lt_params.
  CLEAR lt_params.
endform.                    " fill_it

*&---------------------------------------------------------------------*
*&      Form  fill_it2
*&---------------------------------------------------------------------*
form fill_it2  using    p1.
  lt_callbacks-ldbnode = p1.
  lt_callbacks-get = 'X'.
  lt_callbacks-CB_PROG = 'RFGLBALANCE'.
  lt_callbacks-CB_FORM = 'LDB_CALLBACK'.
  APPEND lt_callbacks.
  CLEAR lt_callbacks.
endform.                    " fill_it2

Any help would be appreciated

Edited by: urjose on Apr 10, 2008 4:54 PM