Problem with IDOC Control Record
Hi All,
mine is File to Idoc scenario, everything is fine, but Idoc is posted with 56 status.Even I'm giving control record at Mapping and check the option at Idoc adapter "Apply control data from payload". Sender port is not populated at Idoc and Sender and receiver partner numbers are taken other than what I had provided at mapping. Can any one explain what can I do now.
Hi Ajay,
It depends whther u wnt to go for automatic filling of control record or filling it from the payload.
In the first case, it will fill the control record with the ALE config u hv done i.e. partner profiles and port defn in we20 & we21.
In the second case also, it will do exactly the same, but in this case there shud be a corresponding ale config to wht u r filling in the mapping. The sender, receiver ports, partners, msgtype values populated in mapping shud be exactly same as tht in ur ALE config.
So, in ur case, compare the values filled in the mappin with tht of the ALE configuration.
Regards,
Akshay
Similar Messages
-
Populating MESFCT and MESCOD in IDOC control record through XI.
Hi Experts,
I want to map only MESFCT and MESCOD fields to IDOC control record as i see help.sap.com and all forums this part in XI is very confusing, as mentioned in the below thread i disabled all the mandatory fields(which are in red color) in the EDI_DC40 and mapped MEDCOD and MESFCT with constants and in IDOC receiver adapter (Communication channel) i have checked the option (Apply Control Record values from Payload) , now i can see both the values MEDCOD and MESFCT in XI payload, however I'm unable to see them in the target (ECC 6.0) system
Threads Used:
/people/sravya.talanki2/blog/2005/12/02/manipulating-idoc-control-records-from-payload
/people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
SAP Note : 728792
Target System
WE09
IDOC control record structure.
Under Typinfo tab:
Message Varient : <Still Empty>
Message Function : <Still Empty> not populated from XI payload.
Any guess ??? will there be any configurations required from ECC point of view to populate these values from XI payload.
Thanks in advance
Kelli.You mentioned that the payload values are visible post mapping during runtime so ,
Try to edit the IDoc adapter once again and ensure that
you have set the Apply Control Record Values from Payload indicator in the receiver IDoc adapter
Activate the adapter and try again. -
First record is not an IDoc control record (check file)
Hi Experts,
I try to build an interface between a non SAP system and a SAP system via IDOC.
I created an .xml test file that I would like to upload now in system with program RSEINB00, but i have error
First record is not an IDoc control record (please check file).
What do I need to do? This is example file I uploaded
?xml version="1.0" encoding="UTF-8"?>
<EXCHANGE_RATE01>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<IDOCTYP>EXCHANGE_RATE01</IDOCTYP>
<MESTYP>EXCHANGE_RATE</MESTYP>
<MESCOD>010</MESCOD>
<SNDPOR>XML_2_IDOC</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPRN>INCENTAGE</SNDPRN>
<RCVPOR>SAPQH3</RCVPOR>
<RCVPRT>LS</RCVPRT>
<RCVPRN>QH3CLNT100</RCVPRN>
<CREDAT>20110526</CREDAT>
<CRETIM>204404</CRETIM>
</EDI_DC40>
<E1ECXHANGE_RATE SEGMENT="1">
<LOG_SYSTEM>QH3CLNT100</LOG_SYSTEM>
<UPD_ALLOW>X</UPD_ALLOW>
<DEV_ALLOW>000</DEV_ALLOW>
<E1BP1093_0 SEGMENT="1">
<RATE_TYPE>RUFX</RATE_TYPE>
<FROM_CURR>USD</FROM_CURR>
<TO_CURRNCY>RUB</TO_CURRNCY>
<VALID_FROM>20120105</VALID_FROM>
<EXCH_RATE>5000</EXCH_RATE>
<FROM_FACTOR>100</FROM_FACTOR>
<TO_FACTOR>1</TO_FACTOR>
<EXCH_RATE_V>0.00000</EXCH_RATE_V>
<FROM_FACTOR_V>0</FROM_FACTOR_V>
<TO_FACTOR_V>0</TO_FACTOR_V>
</E1BP1093_0>
</E1ECXHANGE_RATE>
</ IDOC>
</EXCHANGE_RATE01>
kr,
StefHi Udo,
I thought I posted it in another forum, still not solved.....
kr,
Stef -
Changing IDOC Control Record for EDI inbound Orders Creatiion
Hi,
When I try to process the Inbound orders Idocs file through the GENTRAN EDI System.IDOC's were errored out, because of the Partner function was not defined for the Customer ( Legacy ) ( Type KU ) in the SAP.
Is there any user exit/badi/Configuration to change the Legacy Partner(Customer) to the SAP Partner(Customer) mapping and update the IDOC Control record with the SAP Partner. I am calling EDI_DATA_INCOMING Function module and IDOC_INPUT_ORDERS.IDOCs errored out with Message EO-332 ( Partner function not defined ).
Advance Thanks,
Balaji.It's been a long time since I have done any IDOC processing.
Go to SE37 and enter the function module IDOC_INPUT_ORDERS. Display the source code. Search for "CALL CUSTOMER". You should see several "CALL CUSTOMER-FUNCTION" lines. These are enhancements where you can manipulate the IDOC data. If you locate the correct one (where the data is read from the IDOC but not yet validated), you should be able to map the partner function value. Double-clicking on the number in quotes will bring you to an "EXIT_" function module. A "ZX" INCLUDE program is referenced. If you haven't used the exit yet, double-clicking on the ZX INCLUDE will create it. The values passed into the function module are available in the INCLUDE.
Ideally, you should create a project in transaction CMOD that references the chosen enhancement. This way you can activate/deactivate without commenting/uncommenting the code in the INCLUDE. -
Changing IDOC control record by XSL Mapping
Hi,
I am using scenario: legacy -> XI -> R/3.
In the first step I am mapping XML -> IDOC. I have to map the field "SERIAL" in idoc control record in EDI_DC40 (idoc control record structure) with a constant. When I view the message in XI monitor. I cannot see the change and that field is not visible as before.
Any suggestions would be highly appreciated !
Regards,
FaiqHi,
If you have set the Apply Control Record Values from Payload indicator in the receiver IDoc adapter, the following fields are filled from the IDoc-XML payload:
MESCOD
MESCFT
TEST
EXPRSS
STD
STDVRS
STDMES
SNDSAD
SNDLAD
RCVSAD
RCVLAD
REFINT
REFGRP
REFMES
STATUS
DIRECT
OUTMOD
CREDAT
CRETIM
You can change the contents of only above fields by using a mapping and getting it replected in the SAP System.
Regards,
Bhavesh -
Change IDOC Control Record in Receiver system
Hi Guys,
I want to change the inbound IDOC control record,is there any BADI or F.M available ?
My scenario : XI to SAP and its a custom application.
Regards,
Rajesh.hi Rajesh,
You can refer this wiki link , this will help you out in your problem
https://wiki.sdn.sap.com/wiki/display/ABAP/IDOC+Steps
Regards
Saurabh Goel -
IDOC control record mapping - Sender Partner number defaulted to log. sys.
My PI scenario is file to IDOC scenario.
I have ticked "apply values from payload" checkbox, so Sender Partner Number is being defaulted to logical system assigned to my business system.
Logical system name has to be unique in PI. My understanding is that I can not have more than 1 business system with the same logical system assigned to it.
In SAP, I need to have idocs, coming from different businees systems through PI, set to have the same sender partner number,
which is not possible when "apply values from payload = 'X' and messages are coming from different business systems.
Calling all PI Gurus, have you got a workaround ?Hi,
Idoc will be processed in SAP ECC based on the sender details (snprn,sndpor,sndpfc...) of idoc control record..
instead of different partners name sending in the sender details of control record ...pass the value of the PI logical system name in SNDPRN.... (use only one and this is common for all partners...) any how data records of idoc will have the needed partner details...
In SAP ECC you need to have this logical system ...to process the received idocs..
thats it... Hope you got
Regards
Rajesh -
Idoc control record DIRECT field mapping
Hello,
I have a file to idoc scenario where the receiver system is an external one.
I have the necessity to set in the outbound idoc control record DIRECT = 1.
The XI system is XI 3.0 SP 19 and I've set up the mapping of the idoc control record in the message mapping and selected Apply Control Record Values from Payload and Take receiver from Payload in the Receiver Communication Channel but the idoc is still generated with DIRECT = 2.
In the documentation the field DIRECT is listed as one that will be filled using the message mapping if Apply Control Record Values from Payload is selected.
How can I generate an idoc with DIRECT = 1?
Regards,
ElisaHello Punit,
I know that logically the right value should be 2 but the request of the receiver system is to have it as 1.
They only elaborate the idoc they receive with DIRECT = 1 (outbound).
In SAP documentation the field is listed as one that can be mapping with the message mapping but the idoc adapter is ignoring the mapping even when the Apply Control Record Values from Payload is selected.
Regards,
Elisa -
Inbound IDOC:First record is not an IDoc control record
Dear Experts,
I am currently testing an inbound IDOC with program RSEINB00. Unfortunatelly I always get the errror "First record is not an IDoc control record (please check file)".
So apparently it picks up the file, but there are some format errors I guess?
Does anybody have an idea what to do?
this is file uplaoded:
<?xml version="1.0" encoding="UTF-8"?>
<EXCHANGE_RATE01>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<IDOCTYP>EXCHANGE_RATE01</IDOCTYP>
<MESTYP>EXCHANGE_RATE</MESTYP>
<MESCOD>010</MESCOD>
<SNDPOR>XML_2_IDOC</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPRN>INCENTAGE</SNDPRN>
<RCVPOR>SAPQH3</RCVPOR>
<RCVPRT>LS</RCVPRT>
<RCVPRN>QH3CLNT100</RCVPRN>
<CREDAT>20110526</CREDAT>
<CRETIM>204404</CRETIM>
</EDI_DC40>
<E1ECXHANGE_RATE SEGMENT="1">
<LOG_SYSTEM>QH3CLNT100</LOG_SYSTEM>
<UPD_ALLOW>X</UPD_ALLOW>
<DEV_ALLOW>000</DEV_ALLOW>
<E1BP1093_0 SEGMENT="1">
<RATE_TYPE>RUFX</RATE_TYPE>
<FROM_CURR>USD</FROM_CURR>
<TO_CURRNCY>RUB</TO_CURRNCY>
<VALID_FROM>20120105</VALID_FROM>
<EXCH_RATE>5000</EXCH_RATE>
<FROM_FACTOR>100</FROM_FACTOR>
<TO_FACTOR>1</TO_FACTOR>
<EXCH_RATE_V>0.00000</EXCH_RATE_V>
<FROM_FACTOR_V>0</FROM_FACTOR_V>
<TO_FACTOR_V>0</TO_FACTOR_V>
</E1BP1093_0>
</E1ECXHANGE_RATE>
</ IDOC>
</EXCHANGE_RATE01>
kr,
StefHi Stef,
I have just generated a file from my system, to give you an idea of how a file should look for the program RSEINB00 to import:
EDI_DC40_U1000000000000865239700 3012 DEBMAS06 DEBMAS SAPBCI LS BCICLNT100 GG_TEST LS TVNBTS 20120111135033 20120111135032
E2KNA1M005 1000000000000865239000001000000010050000000001Ms. 000000000000 0 DEBI US 0000000100 Mercedes Lee HAWTHORNE MINERAL 1030 89415 NV A5 B2C LEE E12312312 1520 1520 Fifth Street 775-949-2668 +481111111 323232323 0000000003 0000 0000000000 0 2902100601 00 EN
E2KNA11002 100000000000086523900000200000102
Hope this helps,
Grzegorz -
Req Idoc steps in detail for creating Idoc control records(Sender Non SAP)
Hello All,
I have a scenario where a Microsoft biztalk server communicates with SAP ECC through Idoc ORDERS05 . i need to give them the information of the below IDoc control records
SNDPOR
SNDPRT
SNDPFC
SNDPRN
RCVPOR
RCVPRT
RCVPFC
RCVPRN
IDOCtype
Since the sender is Ms Biztalk . kindly let me know the detailed steps involved in creating the sender side info such as SNDPOR, SNDPRT, SNDPFC and SNDPRN.
Thanks in advance ,
PavithraHi,
The info like (SNDPRN) which has to be providen by Biztalk in the IDoc control of their Idoc are these ones that YOU defined in the ALE config (tx WE20) of your ECC, to accept this IDoc (idoc message / idoc type) from Biztalk.
If your ALE config is not yet created in your ECC, you have to do it. For instance, check in WE20 (partner profile) the ALE config of your other systems, and in WE02 (Idoc log) to see the content of an IDoc Control, by selecting an inbound Idoc.
Do not hesitate to use WE19 to test an idoc integration, as you have to fill the idoc control manually. By this way you will sure be of what info Biztalk has to put inside their IDoc control (EDI_DC40).
Regards
Mickael -
Problem with Table control lines
Hi Friends,
This is the problem with table control lines:
I have screen with table control and I would like change the table control lines dynamicaly.
Exp:
In my PBO the Internal table which I am using to loop the TC is havig 7 records and its displayed with 7 records, now I have added one more record into my ITAB and now ITAB is having 8 records, when I am looping this ITAB with TC its taking the TC lines 7 only.
here is the code:
Initial values in gt_scr400 = 8
Initial values in tc_scr400 = 8
Now added one more recor into gt_scr400 , now gt_scr400 = 9.
LOOP AT gt_scr400
INTO wa_scr400
WITH CONTROL tc_scr400
CURSOR tc_scr400-current_line.
ENDLOOP.
I have used this logic :
DESCRIBE TABLE gt_scr400 LINES g_rec_300 .
tc_scr300-lines = g_rec_300.
but its not modifying the lines in my table control.
How to change the TC lines based on ITAB total records.
Thanks,
Sridharthere is a field in TableViewName-xxx
don't remember the exact field name for (total no of records)
you can check it in debug. when you add records in Internal table, u need to modify this field which is set at the first time when table control is populated. -
Problem with IDOC inbound function module
hi
While excecuting the inbound function module in WE19
I am getting error (short dump)
Incorrect parameter with Call transaction.Creating a Function Module (Direct Inbound Processing)
This step describes how to create a function module which is identified by the IDoc Interface using a new process code and called from ALE (field TBD52-FUNCNAME). Direct inbound processing using a function module (not using a workflow) always includes the ALE layer. This setting (processing with function module and ALE layer) is identified by the value 6 in the field TEDE2-EDIVRS, which is read by the function module IDOC_START_INBOUND. IDOC_START_INBOUND then calls ALE.
Prerequisites
You must have completed the required steps in Defining and Using a Basic Type .
Procedure
Choose Tools ® ABAP Workbench ® Development ® Function Builder, and create a new function module.
Create the segments as global data in your function group. The function module should copy the application data from the segments into the corresponding application tables and modify the IDoc status accordingly. If an error occurs, the function module must set the corresponding workflow parameters for exception handling.
Activate the function module: From the initial screen of the Function Builder select .
In the example, create the function module IDOC_INPUT_TESTER with a global interface. The function module is called when an IDoc of type TESTER01 is received for inbound processing. You will assign an application object ("standard order") to this IDoc type and therefore maintain tables from SD. To do this, call transaction VA01 using the command CALL TRANSACTION. Please note that the intention here is not to simulate a realistic standard order, but only to illustrate how data reaches application tables from an IDoc table via segment structures (form routine READ_IDOC_TESTER) and how the function module triggers an event for exception handling (by returning suitable return variables to the ALE layer in the FORM routine RETURN_VARIABLES_FILL).
A comprehensive example of the code for an inbound function module is provided in the ALE documentation in the SAP Library under Example Program to Generate an IDoc. This function module, for example, also checks whether the logical message is correct and calls a (fictitious) second function module which first writes the application data and then returns the number of the generated document. In addition, status 53 is only set if the application document was posted correctly.
Administration parameters for IDOC_INPUT_TESTER
Application abbreviation
V (Sales and Distribution)
Processing type
Normal, start immediately
Interface for IDOC_INPUT_TESTER (global interface)
Formal parameters
Reference structure
Explanation
Import parameters
INPUT_METHOD
BDWFAP_PAR-INPUTMETHD
Describes how the function module is to be processed (example: in the background)
MASS_PROCESSING
BDWFAP_PAR-MASS_PROC
Mass inbound processing? (indicator)
Export parameters
WORKFLOW_RESULT
BDWFAP_PAR-RESULT
Set to 99999 if an event is to be triggered for error handling.
APPLICATION_VARIABLE
BDWFAP_PAR-APPL_VAR
Variable freely available from application for workflow
IN_UPDATE_TASK
BDWFAP_PAR-UPDATETASK
Asynchronous update? (indicator is not set in example)
CALL_TRANSACTION_DONE
BDWFAP_PAR-CALLTRANS
Transaction called? (indicator is not set in example)
Table
IDOC_CONTRL
EDIDC
IDoc control record
IDOC_DATA
EDIDD
IDoc data records
IDOC_STATUS
BDIDOCSTAT
IDoc status records for ALE
RETURN_VARIABLES
BDWFRETVAR
IDoc assigned to Object type method parameters.
SERIALIZATION_INFO
BDI_SER
If several IDocs are to be processed in a certain sequence: this structure contains the necessary information
Example
FUNCTION IDOC_INPUT_TESTER.
""Globale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC OPTIONAL
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
initialize SET/GET Parameter and internal tables
PERFORM INITIALIZE_ORGANIZATIONAL_DATA.
Move IDOC to internal tables of application
PERFORM READ_IDOC_TESTER.
call transaction Order Entry VA01
PERFORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
set status value
perform write_status_record using errorcode.
return values of function module
PERFORM RETURN_VARIABLES_FILL USING ERRORCODE.
ENDFUNCTION.
FORM INITIALIZE_ORGANIZATIONAL_DATA.
initialize SET/GET parameters
SET PARAMETER ID 'VKO' FIELD SPACE.
SET PARAMETER ID 'VTW' FIELD SPACE.
SET PARAMETER ID 'SPA' FIELD SPACE.
SET PARAMETER ID 'VKB' FIELD SPACE.
SET PARAMETER ID 'VKG' FIELD SPACE.
initialize internal tables
REFRESH BDCDATA.
CLEAR BDCDATA.
CLEAR BELEGNUMMER.
CLEAR ERRTAB.
REFRESH ERRTAB.
REFRESH XBDCMSGCOLL.
CLEAR XBDCMSGCOLL.
ENDFORM. " INITIALIZE_ORGANIZATIONAL_DATA
FORM READ_IDOC_TESTER.
PERFORM INITIALIZE_IDOC.
LOOP AT IDOC_DATA
WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
CASE IDOC_DATA-SEGNAM.
header data
WHEN 'E1HEAD'.
MOVE IDOC_DATA-SDATA TO E1HEAD.
PERFORM PROCESS_SEGMENT_E1HEAD.
position data
WHEN 'E1ITEM'.
MOVE IDOC_DATA-SDATA TO E1ITEM.
PERFORM PROCESS_SEGMENT_E1ITEM.
ENDCASE.
ENDLOOP.
only when there were one or more items
CHECK FIRST NE 'X'.
APPEND XVBAP. "last one
ENDFORM. " READ_IDOC_TESTER
FORM INITIALIZE_IDOC.
CLEAR XVBAK.
REFRESH XVBAP.
CLEAR XVBAP.
POSNR = 0.
FIRST = 'X'.
ENDFORM. " INITIALIZE_IDOC
FORM PROCESS_SEGMENT_E1HEAD.
requested date of delivery
WLDAT = E1HEAD-WLDAT.
delivery date
XVBAK-BSTDK = E1HEAD-BSTDK.
customer number
XVBAK-KUNNR = E1HEAD-AUGEB.
order number
XVBAK-BSTNK = E1HEAD-BELNR.
division
XVBAK-SPART = E1HEAD-SPART.
distribution channel
XVBAK-VTWEG = E1HEAD-VTWEG.
sales organization
XVBAK-VKORG = E1HEAD-VKORG.
order type
XVBAK-AUART = E1HEAD-AUART.
do not fill incoterms (inco1, inco2)
customer function
CALL CUSTOMER-FUNCTION '001'
EXPORTING
PI_VBAK621 = XVBAK
IMPORTING
PE_VBAK621 = XVBAK
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
ENDFORM. " PROCESS_SEGMENT_E1HEAD
FORM PROCESS_SEGMENT_E1ITEM.
position number
XVBAP-POSNR = XVBAP-POSNR + 1.
amount
XVBAP-WMENG = E1ITEM-MENGE.
unit
CALL FUNCTION 'ISO_TO_SAP_MEASURE_UNIT_CODE'
EXPORTING
ISO_CODE = E1ITEM-BMEINH
IMPORTING
SAP_CODE = XVBAP-VRKME
EXCEPTIONS
OTHERS = 0.
material number
XVBAP-MATNR = E1ITEM-LMATNR.
CALL CUSTOMER-FUNCTION '002'
EXPORTING
PI_VBAP621 = XVBAP
IMPORTING
PE_VBAP621 = XVBAP
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
APPEND XVBAP.
ENDFORM. " PROCESS_SEGMENT_E1ITEM
FORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
call transaction first dynpro
PERFORM DYNPRO_START.
call transaction double-line entry
PERFORM DYNPRO_DETAIL2.
incoterms
PERFORM DYNPRO_HEAD_300.
call transaction item datas
PERFORM DYNPRO_POSITION.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'SICH'.
determine input method
IF INPUT_METHOD IS INITIAL.
INPUT_METHOD = 'N'.
ENDIF.
call transaction VA01
CALL TRANSACTION 'VA01' USING BDCDATA
MODE INPUT_METHOD
UPDATE 'S'
MESSAGES INTO XBDCMSGCOLL.
errorcode = SY-SUBRC. " remember returncode for status update
ENDFORM. " CALL_VA01_IDOC_ORDERS
form write_status_record using errorcode.
FILL IDOC_STATUS
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IF ERRORCODE = 0.
IDOC_STATUS-STATUS = BELEG_GEBUCHT. "value 53
GET PARAMETER ID 'AUN' FIELD BELEGNUMMER.
IDOC_STATUS-MSGID = 'V1'.
IDOC_STATUS-MSGNO = '311'.
IDOC_STATUS-MSGV1 = 'Terminauftrag'.
IDOC_STATUS-MSGV2 = BELEGNUMMER.
ELSE.
IDOC_STATUS-STATUS = BELEG_NICHT_GEBUCHT. "value 51
IDOC_STATUS-MSGID = SY-MSwGID.
IDOC_STATUS-MSGNO = SY-MSGNO.
IDOC_STATUS-MSGV1 = SY-MSGV1.
IDOC_STATUS-MSGV2 = SY-MSGV2.
IDOC_STATUS-MSGV3 = SY-MSGV3.
IDOC_STATUS-MSGV4 = SY-MSGV4.
ENDIF.
APPEND IDOC_STATUS.
ENDFORM.
FORM DYNPRO_START.
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
DYNPRO-EINSTIEG
CHANGING LAST_DYNPRO.
ordertype
PERFORM DYNPRO_SET USING 'VBAK-AUART' XVBAK-AUART.
sales organization
PERFORM DYNPRO_SET USING 'VBAK-VKORG' XVBAK-VKORG.
Distribution channel
PERFORM DYNPRO_SET USING 'VBAK-VTWEG' XVBAK-VTWEG.
Division
PERFORM DYNPRO_SET USING 'VBAK-SPART' XVBAK-SPART.
Sales office
PERFORM DYNPRO_SET USING 'VBAK-VKBUR' XVBAK-VKBUR.
Sales group
PERFORM DYNPRO_SET USING 'VBAK-VKGRP' XVBAK-VKGRP.
ENDFORM. " DYNPRO_START
FORM DYNPRO_NEW USING PROGNAME
DYNPRONR
CHANGING LAST_DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGNAME.
BDCDATA-DYNPRO = DYNPRONR.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
LAST_DYNPRO = DYNPRONR.
ENDFORM. " DYNPRO_NEW
FORM DYNPRO_SET USING FELDNAME
FELDINHALT.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
dynpro field name
BDCDATA-FNAM = FELDNAME.
contents
BDCDATA-FVAL = FELDINHALT.
APPEND BDCDATA.
ENDFORM. " DYNPRO_SET
FORM DYNPRO_DETAIL2.
okcode
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-UER2.
fix dynpro number 4001
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
'4001'
CHANGING LAST_DYNPRO.
order party
PERFORM DYNPRO_SET USING 'KUAGV-KUNNR' XVBAK-KUNNR.
purchase order number
PERFORM DYNPRO_SET USING 'VBKD-BSTKD' XVBAK-BSTNK.
requested delivery date
PERFORM DYNPRO_DATE_SET USING 'VBKD-BSTDK' XVBAK-BSTDK.
purchase order date
PERFORM DYNPRO_DATE_SET USING 'RV45A-KETDAT' WLDAT.
ENDFORM. " DYNPRO_DETAIL2
FORM DYNPRO_DATE_SET USING FELDNAME
FELDINHALT.
DATA: DATE TYPE D.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
BDCDATA-FNAM = FELDNAME.
WRITE FELDINHALT TO DATE.
BDCDATA-FVAL = DATE.
APPEND BDCDATA.
ENDFORM. " DYNPRO_DATE_SET
FORM DYNPRO_HEAD_300.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-KKAU.
incoterms part 1
IF NOT XVBAK-INCO1 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO1' XVBAK-INCO1.
ENDIF.
incoterms part 2
IF NOT XVBAK-INCO2 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO2' XVBAK-INCO2.
ENDIF.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'BACK'.
ENDFORM. " DYNPRO_HEAD_300
FORM DYNPRO_POSITION.
LOOP AT XVBAP.
dynpro item double line entry
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'UER2'.
IF XVBAP-POSNR = 1.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(01)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(01)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(1)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(1)' XVBAP-VRKME.
ELSE.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'POAN'.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(02)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(02)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(02)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(02)' XVBAP-VRKME.
ENDIF.
ENDLOOP.
ENDFORM. " DYNPRO_POSITION
FORM RETURN_VARIABLES_FILL USING ERRORCODE.
allocate IDOC numbers to Workflow output parameters
IF MASS_PROCESSING <> SPACE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = PID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
RETURN_VARIABLES-WF_PARAM = APO.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
RETURN_VARIABLES-WF_PARAM = EID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ELSE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = APE.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ENDIF.
ENDFORM. " RETURN_VARIABLES_FILL
Globale Daten von IDOC_INPUT_TESTER
TABLES: E1HEAD, E1ITEM.
DATA: BEGIN OF BDCDATA OCCURS 500.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
DATA: BEGIN OF XVBAK. "Kopfdaten
INCLUDE STRUCTURE VBAK621.
DATA: END OF XVBAK.
DATA: BEGIN OF XVBAP OCCURS 50. "Position
INCLUDE STRUCTURE VBAP.
DATA: WMENG(18) TYPE C.
DATA: LFDAT LIKE VBAP-ABDAT.
DATA: KSCHL LIKE KOMV-KSCHL.
DATA: KBTRG(16) TYPE C.
DATA: KSCHL_NETWR LIKE KOMV-KSCHL.
DATA: KBTRG_NETWR(16) TYPE C.
DATA: INCO1 LIKE VBKD-INCO1.
DATA: INCO2 LIKE VBKD-INCO2.
DATA: YANTLF(1) TYPE C.
DATA: PRSDT LIKE VBKD-PRSDT.
DATA: HPRSFD LIKE TVAP-PRSFD.
DATA: END OF XVBAP.
DATA: BEGIN OF DYNPRO,
EINSTIEG LIKE T185V-DYNNR VALUE 101,
KKAU LIKE T185V-DYNNR,
UER2 LIKE T185V-DYNNR,
KBES LIKE T185V-DYNNR,
ERF1 LIKE T185V-DYNNR,
PBES LIKE T185V-DYNNR,
PKAU LIKE T185V-DYNNR,
PEIN LIKE T185V-DYNNR,
EID1 LIKE T185V-DYNNR,
POPO LIKE T185V-DYNNR,
EIPO LIKE T185V-DYNNR,
KPAR LIKE T185V-DYNNR,
PSDE LIKE T185V-DYNNR,
PPAR LIKE T185V-DYNNR,
KDE1 LIKE T185V-DYNNR,
KDE2 LIKE T185V-DYNNR,
PDE1 LIKE T185V-DYNNR,
PDE2 LIKE T185V-DYNNR,
PKON LIKE T185V-DYNNR,
END OF DYNPRO.
DATA: BEGIN OF PANEL,
KKAU LIKE T185V-PANEL VALUE 'KKAU',
UER2 LIKE T185V-PANEL VALUE 'UER2',
KBES LIKE T185V-PANEL VALUE 'KBES',
ERF1 LIKE T185V-PANEL VALUE 'ERF1',
PBES LIKE T185V-PANEL VALUE 'PBES',
PKAU LIKE T185V-PANEL VALUE 'PKAU',
PEIN LIKE T185V-PANEL VALUE 'PEIN',
EID1 LIKE T185V-PANEL VALUE 'EID1',
EIAN LIKE T185V-PANEL VALUE 'EIAN',
POPO LIKE T185V-PANEL VALUE 'POPO',
EIPO LIKE T185V-PANEL VALUE 'EIPO',
KPAR LIKE T185V-PANEL VALUE 'KPAR',
PSDE LIKE T185V-PANEL VALUE 'PSDE',
POAN LIKE T185V-PANEL VALUE 'POAN',
PPAR LIKE T185V-PANEL VALUE 'PPAR',
KDE1 LIKE T185V-PANEL VALUE 'KDE1',
KDE2 LIKE T185V-PANEL VALUE 'KDE2',
PDE1 LIKE T185V-PANEL VALUE 'PDE1',
PDE2 LIKE T185V-PANEL VALUE 'PDE2',
PKON LIKE T185V-PANEL VALUE 'PKON',
KOAN LIKE T185V-PANEL VALUE 'KOAN',
END OF PANEL.
DATA: BEGIN OF ERRTAB OCCURS 20,
TRANS LIKE TSTC-TCODE,
ARBGB LIKE T100-ARBGB,
CLASS(1) TYPE C,
MSGNR LIKE T100-MSGNR,
TEXT LIKE T100-TEXT,
TEXT(123) TYPE C,
MSGV1 LIKE SY-MSGV1,
MSGV2 LIKE SY-MSGV2,
MSGV3 LIKE SY-MSGV3,
MSGV4 LIKE SY-MSGV4,
END OF ERRTAB.
*---- Hilfsfelder -
DATA: PROGRAMM_AUFTRAG LIKE T185V-AGIDV VALUE 'SAPMV45A'.
DATA: LAST_DYNPRO LIKE T185V-DYNNR,
WLDAT LIKE VBAK-BSTDK,
POSNR LIKE VBAP-POSNR,
FIRST(1) TYPE C VALUE 'X'.
DATA: BEGIN OF XBDCMSGCOLL OCCURS 10.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF XBDCMSGCOLL.
Terminauftrag ( Auftragsart wird fest gesetzt !)
DATA: BELEGNUMMER LIKE VBAK-VBELN.
DATA: ERRORCODE LIKE SY-SUBRC.
Statuswerte fuer IDOC-Status
DATA: BELEG_NICHT_GEBUCHT LIKE TEDS1-STATUS VALUE '51'.
DATA: BELEG_GEBUCHT LIKE TEDS1-STATUS VALUE '53'.
*- Direktwerte für Return_variables -
data:
eid like bdwfretvar-wf_param value 'Error_IDOCs',
pid like bdwfretvar-wf_param value 'Processed_IDOCs',
apo like bdwfretvar-wf_param value 'Appl_Objects',
ape like bdwfretvar-wf_param value 'Appl_Object'.
*- Direktwerte für Workflow_Result -
DATA: C_WF_RESULT_ERROR LIKE BDWFAP_PAR-RESULT VALUE '99999'.
DATA: C_WF_RESULT_OK LIKE BDWFAP_PAR-RESULT VALUE '0'. -
Problem with IDoc scenario - IDocs do not aarive to XI
Hi guys!
I have a problem with IDoc->XI->File scenario. Colleagues send IDocs from R/3 and they are not in the XI. In R/3 they look like if they were correctly sent, however, I can not see them in sxmb monitor. BUT, when they send them again explicitly from R/3 (t-code WE19), they arrive...
REALLY strange...
Any suggestions?
IDX2 metadata loaded.. I think, all needed settings are done.
Question - do I need to set up LS in XI ABAP part?
Thanx, Olian!
P.Hi Olian ,
just check if u have followed all the following steps
SAP XI
1) RFC Destination (SM59)
a) Choose create.
b) Specify the name of the RFC destination
c) Select connection type as 3 and save
d) In the technical settings tab enter the details SAP SID/URL and system number#.
e) Enter the Gateway host as same details above SID/URL.
f) Gateway service is 3300+system number#.
g) In the Logon /Security tab, enter the client user & Password details of Destination system.
h) Test the connection and remote logon.
2) Create Port (IDX1)
a) Select create new button
b) Enter the port name as SAP+SID (The starting char should be SAP)
c) Enter the destination client.
d) Enter the RFC Destination created in SAP R/3 towards other system.
e) Save
3) Load Meta Data for IDOC (IDX2) a) Create new
b) IDOC Message Type
c) Enter port created in IDX1.
SAP R/3
1) RFC Destination (SM59)
a) Choose create.
b) Specify the name of the RFC destination
c) Select connection type as 3 and save
d) In the technical settings tab enter the details SAP SID/URL and system number#.
e) Enter the Gateway host as same details above SID/URL.
f) Gateway service is 3300+system number#.
g) In the Logon /Security tab, enter the client user & Password details of Destination system.
h) Test the connection and remote logon.
2) Create Port (We21)
a) First Select Transactional RFC and then click create button
b) Enter the destination port name as SAP+SID (The starting char should be SAP)
c) Enter the destination client.
d) Enter the RFC Destination created in SAP R/3 towards other system.
e) Save
3) Create Partner Profile (WE20)
a) Create New
b) Create the Partner no. name as same the logical system name of the destination system.
c) Select Partner type LS
d) Enter details for Type: US/USER, Agent, and Lang.
e) Click on the + button to select the message type.
f) Select Partner no. and LS which ever create above.
g) Select Message type
h) Select Process code related to the Message type.
I) save.
In SLD System Landscape Directory
TS for R/3 (Logical system):-Assign the client name created in R/3 as Logical system Name.
Ts for Third Party (Logical system):-
BS for SAP R/3 (Logical system):- Assign the client name created in R/3 as Logical system Name.
BS for Third Party (Logical system):-Enter the XI logical system name.
In Transaction SALE
Define and Assign the logical system name
Regards,
AshwinM -
What is sender port in idoc control record!
Dear all
In idoc control records it is showing two ports Receiver port and sender port.receiver port we cen configured in WE21.
where we configured senderport!
how it is updated in control records!
Thanks & Regards
rajWhen you generate the outbound idoc you provide info for Receipent
"control record
idoc_control-idoctp = 'ACC_GL_POSTING01'.
idoc_control-doctyp = 'ACC_GL_POSTING01'.
idoc_control-mestyp = 'ACC_GL_POSTING'.
idoc_control-rcvprt = 'LS'. "Partner Type of Receiver
idoc_control-rcvprn = 'WCP100'. "Partner Number of Recipient
idoc_control-rcvpor = 'WCP100'. "Partner Port of Recipient
idoc_control-direct = '1'. "outbound idoc
When you receive and inbound idoc you nedd to provided similar info but for Sender
Port for Sender is just like port for Receipent. Both you check in WE21.
Edited by: Marcin Pciak on Oct 17, 2008 9:47 AM -
First record is not an IDOC control record - Error
When I am trying to import orders in my test system through RSEINB00 , it is giving me this error "First record is not an IDOC control record"
But if I manually do it through test tool , it post successfully.
I tried different files which have been posted into production client successfully but still the same error.
It was working just fine until yesterday. Today I modified one file and ran it and it gave me the error. Now its giving me the error in all the file i try.
Any clues ??Hi,
Please check the partner profile (WE20) and IDoc ports (WE21) setup, perhaps someone changed them by mistake.
Also please check the IDoc file content whether there is IDoc control record (EDIDC) information or not.
Regards,
Ferry Lianto
Maybe you are looking for
-
I need some help with my new podcast. Please!
I've just set up a new podcast and it's online on itunes. The xml file is hosted on my website. Can i edit the text within this file...i.e. if there is a spelling mistake...ping this...and itunes will update it? Cos i tried doing that but no changes
-
Itunes cant find my new ipad mini.
I just got a new ipad mini and i followed the setup to the letter but when i connect it to my laptop itunes doesnt recognize it. Ive looked at hours of youtube videos and searched through dozens of google pages and still i cant seem to figure out how
-
My girlfriend has recently purchased the new 13" Macbook Air (3rd gen Intel processor). It is the base model (ie. 1.8GHz i5 processor, 4GB RAM, etc). I have checked on the autodesk website for their Windows 64-bit autocad system requirements and they
-
Can i use other credit card for my id and purchase
Can i use other credit card for my id and purchase
-
Hello Oracle 11.1.0.6.0 We have a financial app developed in house using java and tomcat. Under very high load we have noticed some anomalies. There are multiple customers and only one vendor. We see something like this Vendor balance = 0 Customer 1