Posted: Wed Sep 05, 2007 12:50 pm Post subject: Insert Infotype data with Maintain Text
Author: Jatra Riwayanto
Description:
A simple code that will insert infotype data and Maintain Text data.
For the sample I use infotype 2002 (Attendances).
Type and Data declaration:
Code:
TYPES BEGIN OF text_version.
TYPES nummer TYPE x.
TYPES END OF text_version.
DATA: PERSONALDATAKEY LIKE BAPIPAKEY.
DATA: RETURN LIKE BAPIRETURN1.
DATA: P2002 LIKE P2002.
DATA: PSKEY TYPE PSKEY.
DATA: IT_TEXT TYPE HRPAD_TEXT_TAB .
DATA: LINE TYPE HRPAD_TEXT.
DATA: version TYPE text_version.
DATA: pcl1 TYPE pcl1.Input Parameters:
PARAMETERS: PERNR LIKE PA2002-PERNR DEFAULT '1004511',
AWART LIKE PA2002-AWART DEFAULT 'LW',
BEGDA LIKE PA2002-BEGDA DEFAULT SY-DATUM,
ENDDA LIKE PA2002-ENDDA DEFAULT SY-DATUM,
BEGUZ LIKE PA2002-BEGUZ,
ENDUZ LIKE PA2002-ENDUZ.
Lock Personnel Number:
Code:
START-OF-SELECTION.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = PERNR
IMPORTING
RETURN = RETURN.
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.