Inbound idoc
Hi,
here i am picking the file from APPS and also inbound IDOC creation.
just anyone check my code and give some suggestions in the areas of impovemet technically.
thanks
report znsd007.
*tables : zih001, zid001.
tables: zstbm_lots, zstbm_stages, zibmordertype.
data: t_zstbmlot like zstbm_lots occurs 0 with header line,
t_zstbmstage like zstbm_stages occurs 0 with header line.
parameters :
fromdir like rsmrgstr-path lower case default
'/apps/MQBridge/idocmsgs/',
fromfile like rsmrgstr-name lower case default '*.txt',
todir like rsmrgstr-path lower case default
'/apps/MQBridge/idoctemp/',
tofile like edi_path-pthnam lower case no-display,
procdir like rsmrgstr-path lower case default
'/apps/MQBridge/idocproc/',
procfile like edi_path-pthnam lower case no-display,
toport like edipo-port no-display.
constants: c_tst(7) value 'IBM_TST',
c_bi(6) value 'IBM_BI',
c_mrk(7) value 'IBM_MRK',
c_sbt(7) value 'IBM_SBT'.
data: w_tst(1) type c,
w_bi(1) type c,
w_mrk(1) type c,
w_sbt(1) type c,
w_err(1) type c,
w_processcd(20) type c.
data :
file_list like rsfillst occurs 100 with header line,
pattern like rsmrgstr-name,
tmpfile(128),
begin of in1 occurs 100,
dir(128),
file(128),
data(63000) occurs 0,
data(1063) occurs 0,
end of in1,
str(63000),
*str(1063),
str2 like str,
*outfile(63000) occurs 100 with header line,
*outfile(128),
crtl like edi_dc40,
*counter type i,
segment like edi_dd40-segnam,
segment_no(6) type n,
data like edi_dd40-sdata,
productid_ecid(25),
edidd40 like edi_dd40.
field-symbols : <fs2>,<fs>.
data: messtab like bdcmsgcoll occurs 0 with header line.
start-of-selection.
break-point.
perform getfile_list tables file_list using fromdir fromfile.
delete file_list where type = 'directory'.
toport = 'FILE'.
loop at file_list.
perform getfile tables in1 using file_list.
endloop.
sort in1 by dir file.
check not in1[] is initial.
loop at in1.
at new file.
concatenate todir '/' in1-file into tofile.
replace '//' with '/' into tofile.
condense tofile no-gaps.
open dataset tofile for output in text mode encoding default.
if sy-subrc ne 0.
message e168(j4) with tofile.
endif.
Copy the populated dataset to be saved into a processed directory
concatenate procdir '/' in1-file into procfile.
replace '//' with '/' into procfile.
condense procfile no-gaps.
open dataset procfile for output in text mode encoding default.
if sy-subrc ne 0.
message e168(j4) with procfile.
endif.
clear : edidd40, crtl.
crtl-tabnam = 'EDI_DC40'.
crtl-mandt = sy-mandt.
crtl-docrel = '620'.
crtl-direct = '02'.
concatenate 'SAP' sy-sysid into crtl-rcvpor.
crtl-rcvprt = 'LS'.
crtl-rcvprn = 'SSD_PN0001'.
crtl-mestyp = 'ZCPAOC'.
crtl-idoctyp = 'ZCPAOC01'.
crtl-sndpor = 'SSD0000001'.
crtl-sndprt = 'LS'.
crtl-sndprn = 'SSD_PN0001'.
transfer crtl to : procfile.
clear segment_no.
endat.
refresh t_zstbmlot.
refresh t_zstbmstage.
loop at in1-data into str.
clear edidd40.
edidd40-mandt = sy-mandt.
check not str is initial.
search str for ','.
if sy-subrc = 0.
segment = str+0(sy-fdpos).
sy-fdpos = sy-fdpos + 1.
data = str+sy-fdpos.
case segment.
when 'ZSTBM_LOT'.
clear t_zstbmlot.
split data at ',' into t_zstbmlot-aufnr
t_zstbmlot-ordertype
t_zstbmlot-plant
t_zstbmlot-productid
t_zstbmlot-ec
t_zstbmlot-lotlabel
t_zstbmlot-other_lot_label1
t_zstbmlot-orderqty
t_zstbmlot-customercd
t_zstbmlot-srcevendor
t_zstbmlot-waferid
t_zstbmlot-lotowner
t_zstbmlot-lottype
t_zstbmlot-prty
t_zstbmlot-planstart
t_zstbmlot-planfinish
t_zstbmlot-linecodejc
t_zstbmlot-qualitycod
t_zstbmlot-poi
t_zstbmlot-poi_text
t_zstbmlot-cot
t_zstbmlot-cot_text
t_zstbmlot-lotprodtyp
t_zstbmlot-productcd
t_zstbmlot-familycd
t_zstbmlot-lot_cmmnt
t_zstbmlot-devassem
t_zstbmlot-devassemtx
t_zstbmlot-numdevices
t_zstbmlot-date_of_mfg
t_zstbmlot-pur_order
t_zstbmlot-process_cd.
append t_zstbmlot.
edidd40-segnam = 'ZSTBM_LOT'.
edidd40-hlevel = '2'.
segment_no = segment_no + 1.
edidd40-segnum = segment_no.
edidd40-sdata = t_zstbmlot.
when 'ZSTBM_STAGE'.
clear t_zstbmstage.
split data at ',' into t_zstbmstage-stage.
move data to t_zstbmstage-stage.
append t_zstbmstage.
edidd40-segnam = 'ZSTBM_STAGE'.
edidd40-hlevel = '3'.
edidd40-psgnum = segment_no.
edidd40-sdata = t_zstbmstage.
endcase.
transfer edidd40 to : procfile.
endif.
endloop.
t_zstbmlot-date_of_mfg = t_zstbmlot-date_of_mfg(8).
Determine the order type here using t_zstbmstage and t_zstbmlot
and update order type int t_zstbmlot.
clear w_tst. clear w_bi. clear w_mrk. clear w_sbt. clear w_err.
clear w_processcd.
loop at t_zstbmstage.
if t_zstbmstage-stage = c_tst.
w_tst = 'X'.
elseif t_zstbmstage-stage = c_bi.
w_bi = 'X'.
elseif t_zstbmstage-stage = c_mrk.
w_mrk = 'X'.
elseif t_zstbmstage-stage = c_sbt.
w_sbt = 'X'.
endif.
endloop.
if t_zstbmlot-process_cd = 'SubStock Release' or
t_zstbmlot-process_cd = 'SUBSTOCK RELEASE'.
w_processcd = 'SUBSTOCK RELEASE'.
endif.
select single * from zibmordertype
into zibmordertype where
ibm_tst = w_tst and
ibm_bi = w_bi and
ibm_mrk = w_mrk and
ibm_sbt = w_sbt and
processcd = w_processcd.
if sy-subrc = 0.
t_zstbmlot-ordertype = zibmordertype-ordertype.
else.
write: 'Order type not determined for lot label:',
t_zstbmlot-lotlabel.
endif.
Put into zih001 to create idoc
clear : edidd40, crtl.
crtl-tabnam = 'EDI_DC40'.
crtl-mandt = sy-mandt.
crtl-docrel = '620'.
crtl-direct = '02'.
concatenate 'SAP' sy-sysid into crtl-rcvpor.
crtl-rcvprt = 'LS'.
crtl-rcvprn = 'SSD_PN0001'.
crtl-mestyp = 'ZCPAOC'.
crtl-idoctyp = 'ZCPAOC01'.
crtl-sndpor = 'SSD0000001'.
crtl-sndprt = 'LS'.
crtl-sndprn = 'SSD_PN0001'.
transfer crtl to : tofile.
clear : edidd40.
edidd40-segnam = 'ZIH001'.
edidd40-mandt = sy-mandt.
edidd40-hlevel = 1.
edidd40-sdata = t_zstbmlot.
transfer edidd40 to : tofile.
check not in1-data[] is initial.
at end of file.
close dataset : procfile, tofile.
call function 'EDI_DATA_INCOMING'
EXPORTING
pathname = tofile
port = toport.
check sy-subrc = 0.
Remove file from idocmsgs directory after idoc processing
clear tmpfile.
concatenate in1-dir '/' in1-file into tmpfile.
replace '//' with '/' into tmpfile.
condense tmpfile no-gaps.
delete dataset tmpfile.
endat.
endloop.
form getfile_list tables intab1 structure rsfillst using inval1 inval2 .
call function 'SUBST_GET_FILE_LIST'
exporting
dirname = inval1
filenm = ''
pattern = inval2
tables
file_list = intab1
EXCEPTIONS
ACCESS_ERROR = 1
OTHERS = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. "getfile_list
*& Form getfile
text
-->P_FIELD_LIST text
form getfile tables intab1 structure in1
using inval structure file_list.
data : xfile(128).
clear xfile.
concatenate inval-dirname '/' inval-name into xfile.
replace '//' with '/' into xfile.
open dataset xfile for input message messtab
in text mode encoding default.
check sy-subrc = 0.
clear : str, intab1. refresh intab1-data.
do.
replace ALL OCCURRENCES OF
cl_abap_char_utilities=>horizontal_tab
in xfile with space.
replace all occurrences of '#' in xfile with space.
replace all occurrences of ':' in xfile with space.
replace all occurrences of '_' in xfile with space.
read dataset xfile into str.
replace all occurrences of '#' in str with space.
replace all occurrences of ':' in str with space.
replace all occurrences of '_' in str with space.
if sy-subrc <> 0.
exit.
endif.
intab1-file = inval-name.
intab1-dir = inval-dirname.
append str to intab1-data.
enddo.
if not intab1-data[] is initial.
append intab1.
endif.
close dataset xfile.
endform. " getfile
form showdata changing inval indat.
data : xxtab like sval occurs 100 with header line,
ff0(100), ff1(30), ff2(30), yesno.
inval = indat.
do.
assign component sy-index of structure inval to <fs>.
Z1STB_HDR TO <FS>.
if sy-subrc <> 0. exit. endif.
describe field <fs> help-id ff0.
split ff0 at '-' into ff1 ff2.
clear xxtab.
xxtab-tabname = ff1. xxtab-fieldname = ff2. xxtab-value = <fs>.
append xxtab.
enddo.
call function 'POPUP_GET_VALUES_USER_HELP'
EXPORTING
popup_title = 'Enter Order Information'
TABLES
fields = xxtab
EXCEPTIONS
error_in_fields = 1
others = 2.
if sy-subrc <> 0 .
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. "showdata
hi
i can see views are increasing inmy post. bu ti am not unable to see any when i enter. where are the views stored for this thread. now i am just clicking the reply to this thread.
please let me know where can i see th eviews.
thanks
Similar Messages
-
Creation of Sales Order and Service Contract from Inbound IDOC
Hi Experts,
My requirement is to create a Sales Order as well as a Service Contract from one Inbound IDOC. I am getting the Inbound IDOC from a third Party. The message type is ORDERS and Basic Type is ORDERS02. How ever i am using an extension type IDOC which carries all the required data for Sales Order and Service Contract. My requirement is like, to create a Sales Order first.
I have created a Z FM which is attached to the Process Code and subsequently to the message type. Inside the FM i an calling FM 'IDOC_INPUT_ORDERS' for creation of Sales Order. After that i am changing the IDOC data for the Document Type. I am changing the document type which is responsible for Contract Creation.
Then I am again calling the FM 'IDOC_INPUT_ORDERS' for creation of Contract with the help of IDOC data. But here the Contract is not getting created. It's getting failed during the Batch input session.
I need to solve this problem as soon as possible. Please help me. If there are any other options also please share.
Thanks in Advance.
Regards,
PriyabrataActually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
Regards,
Priyabrata -
Creation of Service Contract from Inbound IDOC
Hi Experts,
I am using Inbound IDOC type ORDERS02 with message type ORDERS for creation of Sales Order. Now my requirement is like to create a Service Contract from that Inbound IDOC. The IDOC type contains all the data require to create a Service Contract. The scenario is like, after creation of Sales Order it will check for the corresponding Service Contract exits or not by querying on a Z table which contains all those entries.
So my idea is to create a Z Program, in which it will check for the Service Contract and will create the same by reprocessing the same IDOC or by calling some Function Module. Please suggest how shall i proceed to create a Service Contract.
Is there any way to reprocess the IDOC or to collect the Data from the IDOC segments pass them to a FM which is responsible for creation of Inbound IDOC. Please suggest if this is feasible.
Thanks in Advance.
Regards,
Priyabrata.Actually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
Regards,
Priyabrata -
How to read file from prsntn server in Inbound idoc FM.
Hi Experts,
I am new to idoc.
I have requirment that i need to read a file from presentation and application server and put in inbound idoc FM.Idoc will be processed in batch.
How can i put selection screen in FM and read the file?or how can i proceed with the solution?
Please help..
UmeshHi Umesh,
My understanding on your requirement is to read a file from pres. server and pass the data to an IDoc function module. Am I correct?
If this is the case then you can create a report which picks up the file from pres. server and then read data from the file and pass it to the parameters of the required function module.
Hope this helps.
Regards,
-Sandeep -
How to create the INBOUND Function Module for INBOUND IDOCs
Hi Friends,
Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
which are recieved from XI Server ?
I am working in SAP-ISU
Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
We have a Standard INBOUND FUNCTION MODULE
IDOC_INPUT_ISU_MR_UPLOAD
which Uploads the Meter Reading Results.
I copied the Same function Module into ZIDOC_INPUT_
and working on it.
Can any one suggest me, whether i am going in correct way or not.
In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
Can I Use the Same BAPI
BAPI_MTRREADDOC_UPLOAD
to Update the below fields,
EABL-SERNR
EABL-ZWNUMMER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS
EABL-ADATTATS
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Kindly Suggest me,
Thanks in Advance,
GaneshHello Ganesh
I think you are going completely astray with you z-function module for IDoc processing.
If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
EABL-SERNR => BAPIEABLU-SERIALNO
EABL-ZWNUMMER =>REGISTER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS => ACTUALMRTIME
EABL-ADATTATS => ACTUALMRDATE
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
- BAPI_TE_EABL
- BAPI_TE_EOSB
Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
Regards
Uwe -
Problem with user exit EXIT_SAPLIEDI_001 for Inbound Idocs in replacing G/L
Hello all,
I am currently facing an issue where my IDOC where exit EXIT_SAPLIEDI_001 is not appearing to work properly.
Basically I am using the FM that processes the inbound idoc (IDOC_INPUT_INVOIC_FI) to post an accounting document. We needed a solution where we need to substitute one of the G/L Accounts.
The current process in our SAP system is that we are creating a billing document which automatically generates the output type (running: program rsnasted subroutine edi_processing) to create and process the inbound idoc.
So I discovered FM EXIT_SAPLIEDI_001 which exports company code and G/L Account back does this.
In this exit, Since I needed to get data from the IDOC, I used the logic ASSIGN: ('(SAPLIEDI)IDOC_DATA[]') TO <fs_edidd> to get the DATA Records for further processing.
During the development and testing phase in the Sandbox system this works.
However when we moved this to production we encountered a situation where the G/L account was not being substituted so were assuming EXIT_SAPLIEDI_001 is not working properly. However when I reprocess this in production either by running the idoc with errors RBDMANI2 or BD87 the IDOC is properly posted and the G/L Account is substituted as well as if I try to repeat the output type of the billing document. So there are instances when in the actual business scenario it does not work except when I reprocess it.
I was wondering if there are any ideas why this could have happened?
Oh ... I also noticed when we transported the objects of the exit. When I try to double click the subroutine I made inside the exit it said the object does not exist. I had to generate the function group of FM EXIT_SAPLIEDI_001 in SE80 in production for it to reflect. I was wondering if this could have caused the issue.
Well I hope to hear from you.
Regards
Edited by: Rob Burbank on Dec 6, 2011 1:03 PMHi,
Check in t.code CMOD whether project is active or not (Activate the Project)
BR,
Vijay -
I am testing creating Sale Order from inbound IDOC with WE19.
Partn. number = AAA001
Partn. type = KU
Partn.func = PY
Message Type = ORDERS
Process Code = ORDE
I get message 51 "Error: Application document not posted" in IDOC status:
VKORG, VTWEG, SPART cannot be determined for customer AAA001 , vendor
Message no. VG 204
Diagnosis
No sales organization, distribution channel or division were sent to the
IDOC. This data is necessary if a sales order is to be added
automatically. If this data is unavailable, you cannot create a sales
order document.
Procedure
If data on the sales organization, distribution channel and division
have not been entered in the IDOC, it must be determined using a user
exit defined in the program.I will receive IDOC from external non-SAP system.
How can i populate E1EDK14 segment with appropriate values:
E1EDK14 -QUALF = 006
E1EDK14 -ORGID = Division (VBAK-SPART)
E1EDK14 -QUALF = 007
E1EDK14 -ORGID = Distribution Chanel (VBAK-VTWEG)
E1EDK14 -QUALF = 008
E1EDK14 -ORGID = Sales Organisation (VBAK-VKORG)
If external system does not know this values?
Edited by: S S on Feb 28, 2009 12:46 PM -
Hello,
I am getting this Error message"error determining posting period(infostructure S008,Variant Z2,RC3)" while creating Sales order from Inbound Idocs in the IDOC,which is affecting sales order creation.
While viewing this Info structure S008, I could see no records have been maintained. Wanted to know the reasons behind this Hard error?
Is it something related to Date Field used in the Update Rules for this Infostructure which is causing this posting period error?
Appreciate your inputs on this.
Thanks and Regards
Mohammed RoshanThank you Jelena,I checked the Ship. Delivery dates in the IDOC which are for Current Fiscal Year- 20140703 and 20140711,Could there be any other reason for this error?
Could it be an issue with e Update rule in this Infostructire S008
Secondly when we try change the update rule thru MC25 for this Infostructure S008,It gives a message"
"Maintenance of SAP standard updates not allowed"
Kindly advice
Thanks and Regards
Mohammed Roshan -
Scheduling agreement inbound idoc error.
Hi Experts,
I am creating an Scheduling Agreement with DELFOR02 inbound idoc, while creation the Scheduling Agreement system is giving error regarding Scheduling Agreement not found. In fact I have create the Scheduling agreement by T-code VA31. And I check the table VLPKM, there are relevant record stored.
Then I maintain the view V_T663A to not check everything when inbound idoc recevie. and tried agan in t-code BD87. the system give me another message Make an entry in all required fields.
How can I handle these error messages?
Thanks..
Regards....Does any one has ideas for that?
Thanks. -
Inbound idoc for updating delivery date of purchase order
Hi All,
Our vendor sends a delivery file consisting of delivery date and quantity(could be partial) for line items of a purchase order.
I need to update the Purchase order line item with the delivery date and quantity sent from the Vendor. It should add a new confirmation line with custom confirmation category in the confirmation tab of the line item in the Purchase order.
Each time we get a delivery file we need to add a new confirmation line in the confirmation tab of the purchase order line item.
How can I get this working using inbound idoc processing? Which Idoc type should I use to solve my issue. Will ORDERSP work for my scenario?
Thank you,
Sonali.>
sonali ashi wrote:
> We have all EDI set up done for ORDERSP idoc in our system. Problem when I use this idoc type by default system is always adding confirmation catgeory 'AB' but we want our custom category to be added instead of 'AB'.
> Edited by: sonali ashi on Dec 23, 2010 9:47 PM
Confirmation category used for order acknowledgement is define in configuation. You can change that from AB to your custom condition and EDI should pickup that.
SPRO->Material Management->Purchasing->Confirmation->Define Internal Confirmation Category
>
sonali ashi wrote:
> I have also noticed that 'AB' confirmation accepts only full quantity order acknowledgement through Idoc processing.
> Manually I can add a "AB" confirmation for partial quantity but in the idoc processing it fails.
> Edited by: sonali ashi on Dec 23, 2010 9:47 PM
Check tolerance limit defined for confirmation category in 'Conformation Control' Node in SPRO at same level as above.
Regards,
Pawan. -
How to block the status mail for an inbound Idoc to a specific user
Hi,
I have to stop sending the error status mail to a specific user depenidng on Partner Type. This will trigger when an inbound Idoc contains status error(message type INVOIC &ORDRSP).This user needs other mails which are getting triggered with the same Idoc for the same partner. Basically, the requirement is to block only the status mail for that user. The statndard task for this is TS70008125 and it uses the agent determination rule 30000001 (Idoc Administrator).in WE46, this task is assigned to process code EDIR. I have copied the task to a custom task and changed the agent determination rule. I would like to know how will I configure this task so that this custom task will trigger for the status error, without altering other workflows for the same message type & the partner type. Or is there any other way to block the mail?
Thanks,
SantoshHi,
I have done the required coding to exclude the specific agent from the rule,copied the task and its ready. My question is how do I map this custom task to a particular partner type, for the message type INVOIC in WE20? (The message type used for the inbound Idoc is INVOIC). I checked the Partner profile in WE20. Most of the process code is using function module as the processing type.
Thanks,
Santosh -
How to create Inbound Idocs in a ABAP program? Any function Module?
Hello Experts,
My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
I populated T_EDIDD with data records from IDOC_INBOUND_WRITE_TO_DB.
To the function module IDOC_INPUT_ORDERS, T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
Can anybody please provide inputs?
Regards.Hi Anjali,
Thanks for the response.
I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
for compatibility: clear administration data of data records
perform data_records_wipe
tables
t_data_records.
FORM DATA_RECORDS_WIPE
TABLES
T_DATA_RECORDS_IN STRUCTURE EDIDD.
LOOP AT T_DATA_RECORDS_IN.
CLEAR: T_DATA_RECORDS_IN-MANDT,
T_DATA_RECORDS_IN-DOCNUM,
T_DATA_RECORDS_IN-SEGNUM,
T_DATA_RECORDS_IN-PSGNUM,
T_DATA_RECORDS_IN-HLEVEL.
modify t_data_records_in.
ENDLOOP.
ENDFORM. " DATA_RECORDS_WIPE
This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
I need to create INBOUND Idocs with the data in ABAP program.
Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
Regards -
Error while trying to post inbound idoc of message type COND_A
Hi,
I am getting error while trying to post inbound idoc of message type COND_A.
If I left Usage & Condition field of segment E1KOMG then 'Table not available' idoc message is coming
and if providing value in above fields then dump is coming.
How to solve ?
Plz do reply
Thanks
MohitI do not see any reason why you would need to use COND_A04 if COND_A01 is working.
What if you could get COND_A04 to post and you would face the same result as in COND_A01?
If SAP does not check wrong values, then you have to do it yourself, or you report an incident at SAP (after you have searched for OSS notes that may have fixed this error already)
For example OSS Note 1169998 - IDoc: KONP-LIFNR values not checked
fixed a situation where the vendor number was not validated. -
Hello,
I have a inbound Idoc of type HRMD_A (basistype HRMD_A07) which is processed by Function module (FM) IDOC_INPUT_HRMD with proofing. After processing an Idoc the status Monitor for ALE messages (BD87) tell me that my Idoc has status 53, which should be the result i would like to have.
Unfortunately when i go to transaction PA20 and check the infotypes, i see that infotype 0302 isn't created. When analyzing this problem i see that during the processing the Infotypes are posted with HR_MAINTAIN_MASTERDATA (dialog mode is 0 and luw_mode = 0 from include LRHA2F02 FORM save_pa_pb_infty) When this is done for infotype 0302 sy-subrc <> 0 the message is A complex application error has occured. This error message is placed in Export parameters
Return and Return1
of HR_MAINTAIN_MASTERDATA. When the program returns to the calling Form it checks if there is message of type E in HR_RETURN (see below) :
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
pernr = ins_objects-objid "#EC DOM_EQUAL
actio = 'INS'
tclas = tclas
dialog_mode = dial_mode
luw_mode = '0'
no_existence_check = $cross
no_enqueue = $cross
IMPORTING
return1 = return
hr_return = hr_return
TABLES
proposed_values = proposed_values.
REFRESH proposed_values.
IF hr_return-msgty = 'E'. "note 984409
CLEAR protocol_error.
protocol_error-msgty = hr_return-msgty.
protocol_error-msgid = hr_return-msgid.
protocol_error-msgno = hr_return-msgno.
protocol_error-msgv1 = hr_return-msgv1.
protocol_error-msgv2 = hr_return-msgv2.
protocol_error-msgv3 = hr_return-msgv3.
protocol_error-msgv4 = hr_return-msgv4.
READ TABLE t_hrobjinfty WITH KEY objid = hr_return-pernr
infty = hr_return-infty
subty = hr_return-subty.
protocol_error-segnum = t_hrobjinfty-segnum.
protocol_error-routid = 'create_prf_pa_pb_object'
As mentioned above, the error message is only placed in the parameters Return and Return1 and not in HR_RETURN.please read the first replyHi,
I think you have preety much done from your end itself .
Could you please tell me what you got in this parameters:
protocol_error-msgty = hr_return-msgty.
protocol_error-msgid = hr_return-msgid.
protocol_error-msgno = hr_return-msgno.
protocol_error-msgv1 = hr_return-msgv1.
protocol_error-msgv2 = hr_return-msgv2.
protocol_error-msgv3 = hr_return-msgv3.
protocol_error-msgv4 = hr_return-msgv4.
It may help us to track down the issue in more better way .
Thanks! -
B1358 error while posting inbound idoc with a FM
Hi
We are trying to post and inbound IDOC with the help of an rfc and eventually creating an invoice from a bdc wrapped in the RFC
The idocs are successfully pushed to R/3 while they are not getting posted and the error code in we02 is as follows
No status record was passed to ALE by the application
Message no. B1358
Diagnosis
The application failed to return a status record to the ALE layer after the IDoc was processed.
This is due to an error in the application function module which processed the inbound IDoc.
Procedure
If you wrote the application function module yourself, you need to change the program.
If the function module in question is a standard application function module, you should consult SAP.
Note: we are using a custom function module
regards
krishnaHi Krishna,
I assume that your function module processing the IDOC does not follow the ALE/IDOC processing rules.
Please check out the programming guidelines in the SAP Online Help under:
<a href="http://help.sap.com/saphelp_nw70/helpdata/en/78/21758051ce11d189570000e829fbbd/frameset.htm">http://help.sap.com/saphelp_nw70/helpdata/en/78/21758051ce11d189570000e829fbbd/frameset.htm</a>
Important are the parameters and tables that need to be returned, containing the correct IDOC processing status. Please take the IDOC processing quite serious in regards to complete Logical Unit of Works.
Best regards,
SIlvia -
Using Inbound IDOC from Java system creation of Outbound delivery
Dear Experts,
The scenario we are having is really very interesting. Hopefully its a good learning for me and also for others also.
The scenario is,
After sales order creation the details will be sent to one Non SAP system (Java) for performing some tasks related to forwarding agent decision, shipping date and etc. Once the details are finalized in that Java system then, the details needs to be transferred to SAP as "Inbound IDOC" process. For this proposed to use the SAP Jco middle ware.
Once the details transfered from Java system to SAP then, the outbound IDOC needs to get generated automatically. Assuming the stock for that sales order line item is available. Also one more complexity is, our client is using custom transaction (ZVl10C) for delivery creation.
Now Query is,
1. Which IDOC, message type and Functional module needs to be used for creating the delivery automatically..??
2. As per assumption, stock of that sales order line item should be available. Due to some business reason the stock was removed during inbound IDOC transfer then, what will happen to the IDOC..?. How to avoid this situation..??
3. As we told we are re going to use SAP Jco b/w SAP & Java system. In this case, how the data will get transfered from Java system to SAP..?
Thanks in advance for the replies I am going to get
Regards,
VELThanks for the feedback. This question is resolved
Maybe you are looking for
-
What happens to old Apple ID in itunes when new ID is added
OK the background. Current set up is my email is used for Apple ID in iTunes. I also use it for iCloud. Wife and kids use my Apple ID for iTunes and have separate Apple IDs for iCloud. We are divorcing soon. Since wife bought most of the music ov
-
How to move node in treeView using two buttons ?
Hello , Am starter , and am working on a Winforms application. I browse an XML file , then I populate treeview in my interface. I want to move selected node in the two sens ( up and down) using two button ( so not with events , normal drag and drop
-
I've updated to iOS 6 and now my music wont play in my Audi - anyone else had this problem?
-
Download entire itunes match library?
I am unable to download my entire itunes library from iTunes Match. How is it done? I have the latest iTunes on 10.8. I enabled iTunes Match and let it upload my entire library. This worked fine. About a week later the external hard drive that I stor
-
Xcode 4 crashes after I open my project
After I waste a day searching why Xcode consumes 100% of CPU (it seems a problem with SVN repository) this application begin to crash systematically when I open my project. I clean the build, I deleted DerivedData contents and Xcode cache... no luck.