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

Documents



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Function Modules | Функциональные модули
View previous topic :: View next topic  
Author Message
Lord
Профессионал
Профессионал



Joined: 10 Sep 2007
Posts: 168

PostPosted: Wed Sep 19, 2007 5:04 pm    Post subject: Documents Reply with quote

http://www.sap.com/partners/icc/scenarios/pdf/pp_cad_46.PDF - BAPIs for the Document Management System

CHANGEDOCUMENT_READ_HEADERS - Get the change document header for a sales document, and put the results in an internal table.
Code:

      CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
           EXPORTING
                objectclass = 'EINKBELEG'
                objectid    = l_objectid
                username    = space
           TABLES
                i_cdhdr     = lt_cdhdr.

      LOOP AT lt_cdhdr WHERE udate IN s_aedat.
        CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
             EXPORTING
                  changenumber = lt_cdhdr-changenr
             TABLES
                  editpos      = lt_editpos.

        LOOP AT lt_editpos WHERE fname = 'LOEKZ'
                           AND   f_new = 'L'.
          p_desc = text-r01. " Cancel Contract
        ENDLOOP.
      ENDLOOP.


CHANGEDOCUMENT_READ_POSITIONS - Get the details of a change document, and store them in an internal table.
This will tell you whether a field was changed, deleted, or updated.
Code:

      CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
           EXPORTING
                objectclass = 'EINKBELEG'
                objectid    = l_objectid
                username    = space
           TABLES
                i_cdhdr     = lt_cdhdr.

      LOOP AT lt_cdhdr WHERE udate IN s_aedat.
        CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
             EXPORTING
                  changenumber = lt_cdhdr-changenr
             TABLES
                  editpos      = lt_editpos.

        LOOP AT lt_editpos WHERE fname = 'LOEKZ'
                           AND   f_new = 'L'.
          p_desc = text-r01. " Cancel Contract
        ENDLOOP.
      ENDLOOP.
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 -> Function Modules | Функциональные модули 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.