Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CHANGE DOCUMENT FUNCTION MODULE

Former Member
0 Likes
6,365

Hi Friends, This is my 2nd same post

I have created a function module using 'SCDO' and it's details are given below.

CALL FUNCTION 'ZAUDIT_CD_WRITE_DOCUMENT'

EXPORTING

objectid = 'ZAUDIT_T'

tcode = 'ZAUDIT'

utime = SY-UZEIT

udate = SY-DATUM

username = SY-UNAME

  • PLANNED_CHANGE_NUMBER = ' '

  • OBJECT_CHANGE_INDICATOR = 'U'

  • PLANNED_OR_REAL_CHANGES = ' '

  • NO_CHANGE_POINTERS = ' '

  • UPD_ICDTXT_ZAUDIT_CD = ' '

n_zaudit_t =

o_zaudit_t =

  • UPD_ZAUDIT_T = ' '

tables

icdtxt_zaudit_cd =

i tried running the function module manually but i don't find any changes occured and found in cdpos and cdhdr.

please guide with a sample code. and what values do i pass in this function module.

thanks & regards,

kat

7 REPLIES 7
Read only

kamesh_g
Contributor
0 Likes
2,457

hi

Have you written the code in text source of FM .

if u have written that plz copy paste .

because it might be because of ur code mistake of FM only .

Read only

Former Member
0 Likes
2,457

Hi,

data:

t_itab like standard table of ztable,

t_itab1 like t_itab with header line.

t_itab1-mandt = '800'.

t_itab1-name = 'zzz'.

t_itab1-empid = '100'.

t_itab1-salary = '25000'.

append t_itab1 to t_itab.

loop at t_itab into ztable.

insert ztext.

CALL FUNCTION 'YDEMO_WRITE_DOCUMENT'

EXPORTING

objectid = 'YDEMO'

tcode = sy-tcode

utime = sy-uzeit

udate = sy-datum

username = sy-uname

  • PLANNED_CHANGE_NUMBER = ' '

OBJECT_CHANGE_INDICATOR = 'I'

  • PLANNED_OR_REAL_CHANGES = ' '

  • NO_CHANGE_POINTERS = ' '

UPD_ICDTXT_YDEMO = 'I'

n_ztable = t_itab1

o_ztable = t_itab1

UPD_ZTABLE = 'I'

tables

icdtxt_ydemo = icdtxt_ydemo .

endloop.

Edited by: Jayapradha Neeli on Feb 18, 2009 4:51 PM

Read only

Former Member
0 Likes
2,457

hi....

you can go with followin way

includes and function module are generated one

**************************************************************************

INCLUDE FZZFLIGHTCDF.

INCLUDE FZZFLIGHTCDV.

TABLES:

SFLIGHT.

DATA:

FS_FLIGHT TYPE SFLIGHT.

FS_FLIGHT-CARRID = 'Lj'.

FS_FLIGHT-CONNID = '0017'.

FS_FLIGHT-SEATSMAX = '450'.

INSERT INTO ZYH1306SFLIGHT VALUES FS_FLIGHT.

IF SY-SUBRC = 0.

CALL FUNCTION 'ZZFLIGHT_WRITE_DOCUMENT'

EXPORTING

OBJECTID = 'ZZFLIGHT'

TCODE = SY-TCODE

UTIME = SY-UZEIT

UDATE = SY-DATUM

USERNAME = SY-UNAME

OBJECT_CHANGE_INDICATOR = 'I'

N_ZYH1306SFLIGHT = FS_FLIGHT

O_ZYH1306SFLIGHT = FS_FLIGHT

UPD_ZYH1306SFLIGHT = 'I'

TABLES

ICDTXT_ZZFLIGHT = ICDTXT_ZZFLIGHT

.

regards

ENDIF.

INCLUDE FZZFLIGHTCDC.

Read only

Former Member
0 Likes
2,457

HI,

INCLUDE yXXXcdt.


DATA:
  t_temp LIKE STANDARD TABLE OF yh1205_temp,
  t_temp1 LIKE t_temp WITH HEADER LINE..


t_temp1-mandt = '800'.
t_temp1-carrid = 'LJ'.
t_temp1-connid = 0148.
t_temp1-countryfr = 'USD'.

APPEND t_temp1 TO t_temp.

LOOP AT t_temp INTO yh1205_temp.
  INSERT yh1205_temp.

  CALL FUNCTION 'YXXX_WRITE_DOCUMENT'
    EXPORTING
      objectid                = 'YH1205'
      tcode                   = sy-tcode
      utime                   = sy-uzeit
      udate                   = sy-datum
      username                = sy-uname
      object_change_indicator = 'I'
      n_yh1205_temp           = t_temp1
      o_yh1205_temp           = t_temp1
      upd_yh1205_temp         = 'I'
    TABLES
      icdtxt_yh1205           = icdtxt_yh1205.
ENDLOOP.

Thanks

kalyan

Read only

Former Member
0 Likes
2,457

Hi,

check ur transaction code TCODE ,give it as 'SE38'.

Read only

Former Member
0 Likes
2,457

Hi,

check this link..

[changeDocument|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/change+document]

Regards

Kiran

Read only

Former Member
0 Likes
2,457

We need to update this parameter

UPD_ZAUDIT_T = ' U'

this log the table fields changes

thank you very much for the replies

Edited by: kat k on Feb 20, 2009 8:31 AM