You are on page 1of 3

PERFORM fetch_username.

** SELECT BELNR
** BUKRS
** BUDAT
** ERFNAM
** LIFNR
** GJAHR
** from RBKP into TABLE itab_inv
** WHERE BUKRS in s_BUKRS and
** BUDAT in s_BUDAT .
**
** if sy-subrc <> 0 .
** MESSAGE 'No Records Found' type 'I' .
** else.
**
** LOOP AT itab_inv into wa_inv.
**
** CONCATENATE wa_inv-BELNR wa_inv-GJAHR into wa_inv-INSTID_A.
**
** modify itab_inv FROM wa_inv .
**
** ENDLOOP.
**
**
** ENDIF.
**
**
*** Fetching Records from Relationships in GOS Environment
** l_TYPEID = 'BUS2081'.
** PERFORM attachment_check .
*
*
*
**wa_att1-RELTYPE = 'ATTA'.
**wa_att1-TYPEID_A = 'BUS2081'.
**wa_att1-INSTID_A = '52000104202006' .
**APPEND wa_att1 to itab_att1 .
*
** Comparing the records to delete records which have attachments
*
** if sy-subrc <> 0 .
**
** else.
** LOOP AT itab_att1 into wa_att1.
**
** READ TABLE itab_inv into wa_inv WITH key INSTID_A = wa_att1-INSTID_A.
**
** IF sy-subrc = 0.
** delete itab_inv WHERE INSTID_A = wa_att1-INSTID_A.
** ENDIF.
** ENDLOOP.
**
** endif.
*
**================
*SELECT
* BELNR
* BUKRS
* BUDAT
* USNAM
* GJAHR
* FROM BKPF into TABLE itab_bkpf
* WHERE BUKRS in s_BUKRS and
* BUDAT in s_BUDAT and
* BLART = 'KR' .
*
*if sy-subrc <> 0 .
* MESSAGE 'No Records Found' type 'I' .
*else.
*
* LOOP AT itab_bkpf into wa_bkpf.
*
* CONCATENATE wa_bkpf-BUKRS wa_bkpf-BELNR wa_bkpf-GJAHR into wa_bkpf-INSTID_
A.
*
* modify itab_bkpf FROM wa_bkpf .
*
* ENDLOOP.
*
*
*ENDIF.
*
** Checking - Attachment at document level
*l_TYPEID = 'BKPF'.
*PERFORM attachment_check .
*
*if sy-subrc <> 0 .
*
*else.
* LOOP AT itab_att1 into wa_att1.
*
* READ TABLE itab_bkpf into wa_bkpf WITH key INSTID_A = wa_att1-INSTID_A.
*
* IF sy-subrc = 0.
* delete itab_bkpf WHERE INSTID_A = wa_att1-INSTID_A.
* else.
*
*
* ENDIF.
* ENDLOOP.
*
*endif.
*
*
*if itab_bkpf is not INITIAL .
*
* SELECT
* BELNR
* BUKRS
* BUZEI
* GJAHR
* FROM BSEG into TABLE itab_bseg
* for ALL ENTRIES IN itab_bkpf
* WHERE BELNR = itab_bkpf-BELNR .
*endif.
*
*
*IF sy-subrc = 0.
*
* LOOP AT itab_bseg into wa_bseg.
*
* CONCATENATE wa_bseg-BUKRS wa_bseg-BELNR wa_bseg-GJAHR wa_bseg-BUZEI into w
a_bseg-INSTID_A.
* modify itab_bseg FROM wa_bseg .
*
* ENDLOOP.
*
** Checking - Attachment at Item level
* l_TYPEID = 'BSEG'.
* PERFORM attachment_check .
*
* if sy-subrc <> 0 .
* else.
* LOOP AT itab_att1 into wa_att1.
*
* READ TABLE itab_bseg into wa_bseg WITH key INSTID_A = wa_att1-INSTID_A.
*
* IF sy-subrc = 0.
* delete itab_bseg WHERE INSTID_A = wa_att1-INSTID_A.
* else.
*
*
* ENDIF.
* ENDLOOP.
*
* endif.
*
*ENDIF.

* CALL METHOD g_grid->get_scroll_info_via_id


* IMPORTING
* es_row_no = wa_scrr
* es_col_info = wa_scrc.
* CLEAR itab_roid.
* APPEND es_row_no TO itab_roid.