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

idoc

Former Member
0 Likes
1,185

Hi All,

Please give me informatin on this.

IDOC_INPUT_ORDCHG is the function module for incomng order change .

EXIT_SAPLVEDA_001- is for --SD EDI Incoming Orders: Reading Additional Data from IDOC.

in this exit i have one include.

in this what i need to do is i need to compae the date which in the idoc (that is from po - customer conformation date ) to so date.

how these two function module are linked.

and how to start my work to update so date from po date.

Kindly any one give me any advise.

Thanks In Advance.

Thanks&Regards.

Ramu.

7 REPLIES 7
Read only

Former Member
0 Likes
991

hi

i have scenario like this wt u have to do is put a break point in appropriate function exit where data record is read and identify the date which is in one of the segment of the idoc and retrieve it to local variable and retrieve the date based on so from data base and using some string operations compare the dates and if u need to update the date pass the date againg to segment data and pack it.

Read only

Former Member
0 Likes
991

hi,

<b>1.</b> a small correction. IDOC_INPUT_ORDCHG will call a customer funciton EXIT_SAPLVEDB_001 and not EXIT_SAPLVEDA_001 as you have written.

<b>2.</b> if u take a global search of IDOC_INPUT_ORDCHG, u will come to know that in include <b>LVEDBF49</b> u have this,

<b>CALL CUSTOMER-FUNCTION '001'</b>

EXPORTING

SEGMENT = IDOC_DATA

DXMESCOD = IDOC_CONTRL-

CONTRL = IDOC_CONTRL

TABLES

DXVBAP = XVBAP

DIVBEP = IVBEP

DXVBADR = XVBADR

DXVBPA = XVBPA

DD_FLAG_P = D_FLAG_P

DXKOMV = XKOMV

DXBDCDATA = BDCDATA

CHANGING

DXVBAK = XVBAK

DD_FLAG_K = D_FLAG_K

EXCEPTIONS

USER_ERROR = 01.

<b>3.</b> u check if the available interface is OK for ur requirement.

if yes, goto EXIT_SAPLVEDB_001 and implement ur code in the include <b>zxvdbu01</b>

<b>4.</b> i hope u know how to implement enhancement in <b>CMOD</b>

reward if useful...

Read only

0 Likes
991

HI

I understood what u said,

In that include i need write code.

I need to compare the dates with po delivary date (that is in idoc,E1EDP20-EDATU,) WITH THE SO delivay date(vbep).

Can u please give Advise how to start and kindly provide me any sample coding and kindly give me the instructions

how to add the code in exit with cmod.

Thanks in Advance.

Thanks&Regards.

Ramu.

Read only

Former Member
0 Likes
991

Hi Ramu

The Exit EXIT_SAPLVEDA_001 is called for every segment. So You need to Identify the segment with PO Date . Only for that Segment , change the value for date. You have many tables available in the FM EXIT_SAPLVEDA_001 which will give all the sales doc details.

Eg code in the exit :

If segment-name eq 'XXXX'.

segment-date = vbap-date.

endif.

Regards

Srikanth.

Read only

former_member404244
Active Contributor
0 Likes
991

Hi Ramu,

In the function module u will get the data in the table SEGMENT (which has structure edidd).

Read and identify the date which is in one of the segment of the idoc and retrieve it to local variable and retrieve the date base on so from data base.Now compare the dates .and finally if u want to modify u can do it and then once agin pass the values to segment table.

Regards,

Nagaraj

Read only

Former Member
0 Likes
991

Hi Ramu,

User exits EXIT_SAPLVEDA_001 is used in FM IDOC_INPUT_ORDERS not in FM IDOC_INPUT_ORDCHG.

For FM IDOC_INPUT_ORDCHG, you can use user exit EXIT_SAPLVEDB_001 for date comparison.

Place break point in EXIT_SAPLVEDB_001 to see all input and output values available for changing.

Hope this will help.

Regards,

Ferry Lianto

Read only

former_member404244
Active Contributor
0 Likes
991

Hi Ramu,

iam giving some sample code please have a look.

READ TABLE idoc_contrl INTO gwa_control WITH KEY mestyp = 'give ur message type here'.

LOOP AT idoc_data INTO wa_data

WHERE docnum = idoc_contrl-docnum.

CASE wa_data-segnam. WHEN 'Z1SCSK'.

MOVE wa_data-sdata TO gwa_z1scsk.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = gwa_z1scsk

IMPORTING

output = gv_vbeln.

WHEN 'Z1SCSP'.

MOVE wa_data-sdata TO gwa_z1scsp.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = gwa_z1scsp-posnr

IMPORTING

output = gv_posnr.

gwa_z1scsp-posnr = gv_posnr.

APPEND gwa_z1scsp TO i_z1scsp.

ENDCASE.

ENDLOOP.

here in place of segments 'Z1SCSK' and 'Z1SCSP' give ur segments name which contains ur required information.

now select the data from data base table

SELECT * FROM vbap INTO TABLE i_vbap

WHERE vbeln EQ gv_vbeln.

IF NOT i_vbap IS INITIAL.

  • Fetch the data from vbep

SELECT * FROM vbep INTO TABLE i_vbep

FOR ALL ENTRIES IN i_vbap

WHERE vbeln EQ i_vbap-vbeln

AND posnr EQ i_vbap-posnr.

endif.

now do calculations here.

in ur case u have to use SEGMENT internal table instead of idoc_data.

Reagrds,

Nagraj

Message was edited by: nagaraj kumar nishtala