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: 

Batch job for delivery note updating means of transport and shipping type

rekha_manjunath2
Participant
0 Kudos

Hi,

I have an issue where the values are not being updated into the screen(VL03N)

The process is as follows :

Purchase order is being created > for this PO, delivery note is created via a background job > The delivery note number can be viewed in the tab, purchase order history > when clicked on delivery note number navigates to another screen (VL03N) outbound delivery > click on hat icon (header) > under shipment tab the means of transport type and shipping type the values are not getting updated.

Background job is set in SM36 > when checked in SM37 job says finished.

An exit is used and coding has been written in an include program yotcn_e0566_update_mol.

If manual delivery notes are created there is no problem. But when the background job is created only the 1st DN gets updated with values while the rest does not get updated.

I tried JBDG to debug the background job but i am not able to get to the break point. I have put the break point in the include program but when i debug the batch job does not go to this point.

I need to analyze why the values are not updating in the fields.

Please help me in this. Its a high priority issue as they are manually creating the DN.

The screen shots are as attached.

Thanking you,

Regards,

Rekha

4 REPLIES 4

Former Member
0 Kudos

Hi Rekha,

Is it a custom program or a Standard SAP program to schedule the background job?

If it is a custom program, are using any BAPI/FM for the creation of the Delivery?

- Abhi

0 Kudos

Hi Abhijeet,

It is a custom program.

i checked the program in SE38 but i dont find any FM or BAPI being called.

The program has a variant which is used in the background job.

Regards,

Rekha

0 Kudos

Hi Rekha,

you have to provide more piece of information on the custom program logic.

are you running a BDC to create Delivery? or you are submitting a Standard SAP program for the creation of Delivery.

you have to check the custom program and need to tell which part is actually creating a delivery in your system and then you need to share so that everyone in the forum can help you.

- Abhi

0 Kudos

Hi Abhijeet,

I apologize for not being descriptive. Standard Program is being submitted for creation of delivery.

The standard program is RVV50R10C. Variant is created for this program.

Issue is resolved.

Reason for the issue:

The custom logic(EDD566) was placed inside a standard user exit (SAVE_DOCUMENT_PREPARE) which triggers based on the ship to.

If multiple orders have the same ship to our EDD566 will trigger once and it will only update the first delivery, we may not encounter this problem if all the orders have different ship-to.


The piece of code written is


LOOP AT xlips .

             lw_werks-werks = xlips-werks.

             APPEND lw_werks TO lt_werks.

           ENDLOOP.

           SORT lt_werks BY werks.

           DELETE ADJACENT DUPLICATES FROM lt_werks COMPARING werks.

           IF lt_werks IS NOT  INITIAL.

             SELECT

               classification

               route

               mol

               mos                                           "Def 51320

               FROM yotcd_e566_mol

               INTO TABLE lt_mol

               FOR ALL ENTRIES IN lt_werks

              WHERE werks = lt_werks-werks."xlips-werks.

*              WHERE  vstel = xlikp-vstel.

           ENDIF.


Thank u very much for your support.


Regards,

Rekha