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: 

Extension of Idoc LOIPRO01 is not triggering from Transaction POIT

Former Member
0 Kudos

Hi,

I have a requirement wherein for process orders, all the information is present in the LOIPRO except batch number. So I have extended this Idoc with extension ZLOIPRO01 and have added a segment ZE1AFPOL  under E1AFPOL segment.


I have added the extension in WE82(message type) and configured the extension in WE20(partner profile).

After that I have added the code in exit EXIT_SAPLLOI1_002 and created the project in CMOD and activated the code.


All the segments are coming when I am running POIT but my new segment is not appearing in WE02.

Also this particular exit is not triggering.

Am I missing something there?

Please suggest


3 REPLIES 3

nabheetscn
Active Contributor
0 Kudos

FIrst of all in your generate idoc control record do you see extension..? Secondly please share your code...? Are you able to go into debugging

nabheet

0 Kudos

Hi Nabhneet,

Yes I can see the extension in the generated Idocs.

Please find code below


TYPES:
         gty_idoc_data      TYPE edidd.
   DATA:
         gs_idoc_data       TYPE gty_idoc_data,
         gt_idoc_data       TYPE STANDARD TABLE OF edidd.
   DATA:
      lw_ze1afpol  TYPE ze1afpol.        " Locations Segment

   DATA: l_charg TYPE charg_d.
   SELECT SINGLE aufnr
          posnr
          charg
     FROM afpo
   INTO l_charg
     WHERE posnr = f_afpo-posnr.
   IF sy-subrc EQ 0.
     lw_ze1afpol-charg            = l_charg.
   ENDIF.
   gs_idoc_data-segnam              = 'ZE1AFPOL'.                 " Segment type
   gs_idoc_data-sdata               = lw_ze1afpol.                 " Application data
   APPEND gs_idoc_data TO gt_idoc_data.
   idoc_data[] = gt_idoc_data[].

0 Kudos

Hi Anil

Few observation it looks like you are using wrong exit. Secondly the code which you have done is not correct. You will have to append your segment at an index next to E1AFPOL. Please note that E1AFPOL can have multiple line since its item informaiton.

Can you please provide me the detail of the function module generating the IDOC. I was not able to find any detail by doing where used list on the mentioned exit in post 1 above

Nabheet