02-22-2005 12:51 PM
Hi,
I'm trying to build an idoc inside a FM.
I have problem with the i_edi_dd-segnam. It has only a length of 10.
Any pointers?
Problem med att i_edi_dd-segnam bara har en längd på char(10).
Hur löser vi enklast detta tro ?
data:
l_e1bpmeposchedule like e1bpmeposchedule,
i_edi_dd type table of edi_dd with header line.
........
E1BPMEPOSCHEDULE - Fields for Purchase Order Delivery Schedule Lines
l_e1bpmeposchedule-po_item = i_eket-ebelp.
l_e1bpmeposchedule-sched_line = i_eket-etenr.
l_e1bpmeposchedule-delivery_date = i_eket-eindt.
i_edi_dd-segnam = 'E1BPMEPOSCHEDULE'. " PROBLEM !
i_edi_dd-sdata = l_e1bpmeposchedule.
append i_edi_dd.
clear i_edi_dd.
......
//Martin
02-22-2005 12:57 PM
Hi Martin,
Swedish? Nice!
Use newer definitions with structures edi_dc40, edi_dd40 and FM IDOC_INBOUND_SINGLE.
Regards,
Christian
02-22-2005 12:57 PM
Hi Martin,
Swedish? Nice!
Use newer definitions with structures edi_dc40, edi_dd40 and FM IDOC_INBOUND_SINGLE.
Regards,
Christian
02-22-2005 1:17 PM
Swedish: yes
System: 620
Today I use FM = IDOC_INBOUND_SYNCHRONOUS
I will try IDOC_INBOUND_SINGLE... but I need to make a syncrone call... is it pooible with this FM ?
//Martin
02-22-2005 1:23 PM
Hi Martin,
the function module is a successor to IDOC_INBOUND_SYNCHRONOUS. The interface has been adapted
to the new 4.0 record types (control record EDI_DC40,
data record EDI_DD40) for IDocs. The function module
returns the number of the generated IDocs -> it will be synchronous.
Regards,
Christian
02-22-2005 1:05 PM
Hi Martin,
You've to define your struc as follows :
E.g. exit EXIT_SAPLF050_006
With IDOC_DATA STRUCTURE <b>EDIDD</b>
And idoc_data-SEGNAM = length 27
Regards Andreas
02-22-2005 1:09 PM
Hi Andreas,
interesting: my EDI_DD-SEGNAM is char10.
I'm on 620, what's your release?
Regards,
Christian
02-22-2005 1:24 PM
Hi,
-> look with se11 struc. <b>EDIDD</b> field SEGNAM
component EDILSEGTYP -> lgth is 27
in 4.6 and 4.7
regards
02-22-2005 1:31 PM
Aah,
it's not a release question: EDIDD <> EDI_DD!
But structure is defined by function module, so switching from IDOC_INBOUND_SYNCHRONOUS to IDOC_INBOUND_SINGLE will make the change from EDI_DD to EDI_DD40.
Thanks,
Christian
02-22-2005 2:23 PM
Hi,
I have a question regarding date conversion as well.
When I TEST my new FM with Idoc process stuff.
I enter date as the format DD.MM.YYYY
When I later on look at my posted idoc... ther is an error. The date is now YYYYMMDD.
I need to convert the deliverydate ...
Any pointers ?
//Martin
02-22-2005 2:54 PM
Use FM CONVERTEXTERNALDATE* or CONVERTINTERNALDATE* for your needs.
In FM's date is entered in DD.MM.YYYY format, it does an internal conversion, but while calling the function module, your date has to be in the format of YYYYMMDD
Regards,
Subramanian V.
02-23-2005 7:44 AM
Hi,
Feels like very first day with ABAP
Why isn't this working ?
REPORT Z_MA_CASE_TMP1.
data: MyDate type d, NewDate type d,NewDate2 type d.
MyDate = sy-datum. " MyData is now 20050223
call function 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = NewDate
IMPORTING
DATE_EXTERNAL = MyDate
EXCEPTIONS
DATE_INTERNAL_IS_INVALID = 1
OTHERS = 2
" MyData is now 000000
" NewData in now 00.00.00
What I want is to make my date 20050223(YYYYMMDD) to be 23.03.2005 (DD.MM.YYYY)
//MA
//MA
02-23-2005 7:53 AM
Hi Martin,
you are mixing up exporting and importing: you export your parameters to function module (which are defined under importing).
So empty new_date overwrites filled my_date.
And external format has to be a char10...
And write will do the job much easier...
Spend some time as consultant before coming back?
Regards,
Christian