Application Development 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: 

Copy Basic Finish Date to Custom field

Former Member
0 Kudos

Hi,

I need to copy the Basic Finish Date from 'IW38' to Custom field (Target Date)  of type date under enhancement tab in IW32 tcode. I have design layout in screen 900 of function group xwoc. Please refer the screen designing i have attached.

Jiya

1 ACCEPTED SOLUTION

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Jiya,

Suppose the field name of your Target date is ZZTRGTDT, then:

Put this code in the include ZXWOCU07 of user-exit IWO10009.


CAUFVD_IMP-ZZTRGRTDT = CAUFVD_IMP-GLTRP.

  CALL FUNCTION 'CO_IH_SET_HEADER'

    EXPORTING

      CAUFVD_IMP = CAUFVD_IMP.

  PERFORM HEADER_UPDATE(SAPLCOIH).


When you create an Order with Basic Finish Date filled OR whenever you put the Basic Finish Date and Save the Order the Target Date field is automatically updated with the value of Basic Finish Date upon SAVE event of the Order. You can verify this by re-entering the Order ( IW33 / IW32).

Hope this serves your purpose.

Also have a look at this related document posted recently.

Regards

KJogeswaraRao

5 REPLIES 5

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Jiya,

Suppose the field name of your Target date is ZZTRGTDT, then:

Put this code in the include ZXWOCU07 of user-exit IWO10009.


CAUFVD_IMP-ZZTRGRTDT = CAUFVD_IMP-GLTRP.

  CALL FUNCTION 'CO_IH_SET_HEADER'

    EXPORTING

      CAUFVD_IMP = CAUFVD_IMP.

  PERFORM HEADER_UPDATE(SAPLCOIH).


When you create an Order with Basic Finish Date filled OR whenever you put the Basic Finish Date and Save the Order the Target Date field is automatically updated with the value of Basic Finish Date upon SAVE event of the Order. You can verify this by re-entering the Order ( IW33 / IW32).

Hope this serves your purpose.

Also have a look at this related document posted recently.

Regards

KJogeswaraRao

0 Kudos

Hi,


I have written this code as structure name is zzotfd,now  what i need to write on  PERFORM HEADER_UPDATE(SAPLCOIH).?


It was not existing so i have created as global data in include program ZXWOCTOP and object name is SAPLCOIH, now what i need to write under perform statement


.Can you guide me. I have pasted the code.



IF sy-tcode = 'IW38' .

  caufvd_imp-zzotfd = caufvd_imp-gltrp.

ENDIF.

CALL FUNCTION 'CO_IH_SET_HEADER'

  EXPORTING

    caufvd_imp       = caufvd_imp

*   IMPORTING

*     CAUFVD_EXP       =.

PERFORM HEADER_UPDATE.


Thanks in Advnace.


Jiya

0 Kudos

Jiya,

Why confusion?

I have clearly mentioned that this code is for include ZXWOCU07. Put the code as it is. There is nor IW38 here. You may use Code IW32 for If. The result will be seen upon Order SAVE.

Former Member
0 Kudos

Hi,

The code is working fine in debugging mode and it will work in save mode, i need to display the value on screen while we open a transaction iw32

i need to display like the highlighted one

Jiya

0 Kudos

This was already discussed and worked-out in detail in thread Go through the second part of the solution given there. The same thing applies here too. Why confusion?.