SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Установка Payment Block Key



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
vetal
Участник
Участник



Joined: 18 Jan 2008
Posts: 44

PostPosted: Wed Oct 29, 2008 1:36 pm    Post subject: Установка Payment Block Key Reply with quote

Коллеги, какой BAPI можно изменить поле Payment Block Key (BSEG-ZLSPR)

Сейчас используем batch-input для FB02, но он переодически дает ошибки.
Back to top
View user's profile Send private message
Alex80
Старший специалист
Старший специалист


Age: 44
Joined: 24 Jan 2008
Posts: 129

PostPosted: Wed Oct 29, 2008 4:28 pm    Post subject: Re: Установка Payment Block Key Reply with quote

vetal wrote:
Коллеги, какой BAPI можно изменить поле Payment Block Key (BSEG-ZLSPR)

Сейчас используем batch-input для FB02, но он переодически дает ошибки.
Вроде бы как есть FI_DOCUMENT_CHANGE, сам не пользовался, но говорят что этот ФМ тоже не подарок.
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 46
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Wed Oct 29, 2008 5:03 pm    Post subject: Reply with quote

Вот такая программка поможет:

Code:
TYPE-POOLS : TPIT.

DATA : WA_BSEG TYPE BSEG,
       W_MESSAGE TYPE T100-TEXT.

DATA : IT_ERRTAB TYPE TPIT_T_ERRDOC WITH HEADER LINE,
       IT_FLDTAB TYPE TPIT_T_FNAME WITH HEADER LINE,
       IT_BUZTAB TYPE TPIT_T_BUZTAB WITH HEADER LINE.

PARAMETERS: PA_BUKRS TYPE BUKRS OBLIGATORY,
            PA_BELNR TYPE BELNR_D OBLIGATORY,
            PA_GJAHR TYPE GJAHR OBLIGATORY,
            PA_BUZEI TYPE BUZEI OBLIGATORY,
            PA_ZLSPR TYPE DZLSPR OBLIGATORY.

START-OF-SELECTION.
* Add field to update
  IT_FLDTAB-FNAME =  'ZLSPR'.
  APPEND IT_FLDTAB.

* Set value
  WA_BSEG-ZLSPR = PA_ZLSPR.

* Get item for update
  SELECT SINGLE     BUKRS BELNR GJAHR BUZEI KOART UMSKZ BSCHL MWART MWSKZ
    FROM BSEG
    INTO CORRESPONDING FIELDS OF IT_BUZTAB
      WHERE BELNR = PA_BELNR
      AND   BUKRS = PA_BUKRS
      AND   GJAHR = PA_GJAHR
      AND   BUZEI = PA_BUZEI.
  IF SY-SUBRC = 0.
    APPEND IT_BUZTAB.
    CLEAR IT_BUZTAB.
  ENDIF.

  CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'
    EXPORTING
      S_BSEG     = WA_BSEG
    IMPORTING
      ERRTAB     = IT_ERRTAB[]
    TABLES
      IT_BUZTAB  = IT_BUZTAB
      IT_FLDTAB  = IT_FLDTAB
    EXCEPTIONS
      BDC_ERRORS = 1
      OTHERS     = 2.
  IF SY-SUBRC <> 0.
    PERFORM GENERATE_MESSAGE.
    WRITE : W_MESSAGE.
  ELSE.
    WRITE : 'Updated successfully'.
  ENDIF.

*&---------------------------------------------------------------------*
*&      Form  generate_message
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM GENERATE_MESSAGE .
  CLEAR W_MESSAGE.

  READ TABLE IT_ERRTAB INDEX 1.
  IF SY-SUBRC = 0.
    CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        ID        = IT_ERRTAB-ERR-MSGID
        LANG      = SY-LANGU
        NO        = IT_ERRTAB-ERR-MSGNR
        V1        = IT_ERRTAB-ERR-MSGV1
        V2        = IT_ERRTAB-ERR-MSGV2
        V3        = IT_ERRTAB-ERR-MSGV3
        V4        = IT_ERRTAB-ERR-MSGV4
      IMPORTING
        MSG       = W_MESSAGE
      EXCEPTIONS
        NOT_FOUND = 1
        OTHERS    = 2.
  ENDIF.

ENDFORM. " generate_message
Back to top
View user's profile Send private message Blog
vetal
Участник
Участник



Joined: 18 Jan 2008
Posts: 44

PostPosted: Fri Oct 31, 2008 1:36 pm    Post subject: Reply with quote

Спасибо, буду пробовать.
Back to top
View user's profile Send private message
SDюк
Участник
Участник



Joined: 12 Aug 2011
Posts: 2

PostPosted: Fri Aug 12, 2011 2:08 pm    Post subject: Reply with quote

Не подскажете - мне нужно тоже самое но для предварительно зарегистрированных документов.
Back to top
View user's profile Send private message
Удав
Гуру
Гуру


Age: 48
Joined: 25 Jan 2008
Posts: 580
Location: Москва

PostPosted: Mon Aug 15, 2011 3:20 pm    Post subject: Reply with quote

А какие сбои дает пакетный ввод?
_________________
С уважением,
Удав.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.