lunes, 22 de enero de 2018

Obtener banco de proveedor (Get bank from a creditor)

DATA:
 s_lfbk TYPE lfbk,
 s_bnka TYPE bnka.

 CLEARs_lfbk.
  SELECT SINGLE FROM lfbk INTO s_lfbk
  WHERE lifnr EQ lfa1-lifnr.
  IF sy-subrc EQ 0.

  CLEARs_bnka.
    CALL FUNCTION 'READ_BANK_ADDRESS'
      EXPORTING
        bank_country s_lfbk-banks
        bank_number  s_lfbk-bankl
      IMPORTING
        bnka_wa      s_bnka
      EXCEPTIONS
        not_found    1
        OTHERS       2.
    IF sy-subrc EQ 0.
    ENDIF.

  ENDIF.

No hay comentarios:

Publicar un comentario