Skip to Content
0

NFe - Document Date

Nov 24, 2016 at 07:28 PM

83

avatar image
Former Member

Hello everybody,

I need a little help with something that came up today:

It has been requested by a customer of ours to automatically fill the field DOCUMENT DATE with the actual date (SY-DATUM) only when user is creating an incoming nota fiscal through transaction J1B1N (manual). Nowadays this field is imported by SAP in blank however for some other customers this field is being filled automatically.

I tried to debug the environment of this customer where this field is being filled automatically however the variable DOCDAT of structure J_1BDYDOC seems to be filled right after I jump into the function J_1B_NF_OBJECT_EDIT_NEW. Am I doing something wrong? Is there any standard configuration where I can set this date to be imported automatically?

screenshot-4.jpg (53.6 kB)
screenshot-2.jpg (198.3 kB)
screenshot-3.jpg (210.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Renan Correa
Nov 29, 2016 at 09:17 PM
0

Hello,

This field is set for outgoing NF and not for incoming NF. What happens is that field is already filled in program SAPLJ1BB2 before calssing the *NEW function. IF you include in the variables (SAPLJ1BB2)J_1BDYDOC-DOCDAT you can see that.

It's originally filled in include MJ1B1I01.

IF WK_HEADER-DIRECT = '2'.

IF WK_HEADER-DOCDAT IS INITIAL.

if not sy-datlo is initial.

WK_HEADER-DOCDAT = SY-DATLO.

else.

WK_HEADER-DOCDAT = SY-DATUM.

endif.

Regards,

Renan Correa

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you so much for replying Renan!

So apparently there is no standard configuration in order to automatically fill this field with the current date.

Anyway, talking to our customer, we decided to go further with a field exit.

Have a nice day!

0