Inbound function module for custom IDOC
HI,
I have created custom IDOC.I need to create inbound function module for that custom IDOC.Can any one send me sample
function module for custom IDOC.(what are all the import Export,tables parameters and exceptions that I need to create for function module)
Thanks&Regards
Rama.Mekala
HI Rama,
I presumed that You are talking about a FM to create inbound IDOC. So for creating inbound IDOC you can use '
CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS'
TABLES
idoc_control_rec_40 = gt_edidc
idoc_data_rec_40 = gt_edidd.
IF sy-subrc NE 0.
* MESSAGE e000 WITH text-003.
* ELSE.
* MESSAGE i000 WITH text-004 .
ENDIF.
just prepare edidc and edidd record in and pass it to the FM..
Hope this will work for you...
Thanks
Similar Messages
-
How to Assign a function module for customized IDOC
Hi,
I have created a customized IDOC. Can any body explain how to assign a FM for customized IDOC? Is same IDOC can be used for both Outbound and Inbound Process? In WE41 and WE42 we have to give the outbound and inbound function module name. can we give same function module? Is process code is same for both outbound and inbound process?
Valuable suggetions are appreciated.
Regards,
RamHi ,
Here is the Procedure for the Inbound Idoc Funtion Module
Function Module : SE37
Message : WE81
Assign message : WE82
Assgin FM : we57
Process Code : WE42.
Assign Partner Profile - WE20,
To test the Inbound IDOC.
In WE19, Give the IDOC number & execute ... then put the cursor on the idoc control record . then click on the Standard Inbound push button on the application tool bar.it will show show all the details like partner no,type , message type , process code & function module name ...
now put a break point in the function module .. & debug .
if u r using customised inbound function module , then click on inbound function module .. there u will get a pop screen with FM name & debugging option in both background & foreground mode...
Reward Points if it is Useful.
Thanks,
Manjunath MS -
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 -
Inbound function module for IDoc type INFRECMASS01
Hello everybody,
What is the inbound function module for IDoc type INFRECMASS01?
I tried IDOC_INPUT_INFREC (as for IDoc INFREC01), but I got the following message (B1 044): Incorrect function module IDOC_INPUT_INFREC called up
Thanks in advance
RolandThe only difference between INFRECMASS01 and INFREC01 is that repitition of the same segments. However, the standard function module is hardcoded with IDOC type INFREC01, so if you want to use the MASS IDOC copy the standard one and put in the logic to loop around and process the info records one by one.
There is no standard funtion that can process mass idoc of the info record.
Regards,
Ravi
Note: Please mark the helpful answers -
Function module for posting idoc
Hi,
For Inbound Idoc
In function module for posting the Idoc what should be given as the return_variable.Hi,
it depends on application.i have written some piece of code for my requiremnt.chek it,may be it will help u.
FORM idoc_status_ord_change
TABLES idoc_data STRUCTURE edidd
idoc_status STRUCTURE bdidocstat
r_variables STRUCTURE bdwfretvar
USING idoc_contrl LIKE edidc
value(retn_info) LIKE bapiret2
status LIKE bdidocstat-status
wf_result LIKE bdwf_param-result.
CLEAR idoc_status.
idoc_status-docnum = idoc_contrl-docnum.
idoc_status-msgty = retn_info-type.
idoc_status-msgid = retn_info-id.
idoc_status-msgno = retn_info-number.
idoc_status-appl_log = retn_info-log_no.
idoc_status-msgv1 = retn_info-message_v1.
idoc_status-msgv2 = retn_info-message_v2.
idoc_status-msgv3 = retn_info-message_v3.
idoc_status-msgv4 = retn_info-message_v4.
idoc_status-repid = sy-repid.
idoc_status-status = status.
APPEND idoc_status.
IF idoc_status-status = '51'.
wf_result = '99999'.
r_variables-wf_param = 'Error_IDOCs'.
r_variables-doc_number = idoc_contrl-docnum.
READ TABLE r_variables FROM r_variables.
IF sy-subrc <> 0.
APPEND r_variables.
ENDIF.
ELSEIF idoc_status-status = '53'.
CLEAR wf_result.
r_variables-wf_param = 'Processed_IDOCs'.
r_variables-doc_number = idoc_contrl-docnum.
READ TABLE r_variables FROM r_variables.
IF sy-subrc <> 0.
APPEND r_variables.
ENDIF.
ENDIF.
regards,
nagaraj -
Function module for customer debit note/credit note
Hi
Can you please tell us the function module for the following:
1. Customer debit note
2. Customer credit note
Also, we would like to have function module for extracting GL balances at business area/profit center level.
Regards
S.RadhakrishnanHi
We are looking for function module for posting FI Invoice/credit memo using FB70/FB75.
Also, we need function module for extracting GL balances at business area/profit center level.
Regards
S.Radhakrishnan -
Function module for custom report for cost center group
Hello all,
I wonder, if there is any SAP function module for following query:
We have got a custom program, which evaluates cost centers. We would like to evaluate a cost center group, like it is available within the report painter - the output screen is splitted into two parts, on the left part there is the cost centre group hierarchy and on the right side, there are the values for the node, which is selected within the hierarchy.
Is there any standard function module od do we have to program it ourself?
Thanks in advanceHi Peter,
You have a BAPI which gives you the details of cost centre group, if this is what you are looking for:
BAPI_COSTCENTERGROUP_GETLIST
Regards,
Eli -
Function Module For Customer Receivable Invoice Document Wise
Dear All,
Is there a standard Function Module / BAPI available for calculating Customer Receivable amount invoice document wise? I will explain the scenario in greater detail:
1) Invoice is booked against customer (FB70 / SD Interface)
2) Receipt is made (F-28 )
3) Matching of invoice is done at the time of receipt (either partial or residual)
4) Customer Account Clearing is done (F-32)
We have explored tables BSID,BSAD,BSEG and BSE_CLR, but are unable to decipher the exact logic by which the System is storing the cleared amount, invoice document wise. We have tried referring to BSEG-REBZG (Invoice Reference) and BSE_CLR for finding out the clearing document and thus arriving at the invoice document balance, but the table entries are not similar in case of partial and residual payment and hence it is creating problem in deducing the actual invoice wise open balance. Can anyone refer to some FM / API / Logic for deducing the same?
Your inputs will be sincerely appreciated.
Thanks and Sincere Regards,
AmitabhaHi People,
Any ideas?
Thanks and Sincere regards,
Amitabha -
ABAP function module for Customer Specific Status
I am looking for a standard ABAP function module that will return the customer specific status for a person.
Please let me know if any exists.
Thanks,
HariniCustomer specific status for a person .
Could you pleasee give more details...for what purpose you are trying to get the status of a person. so that it will be easy for everyone to search -
I need a function module for processing idoc
i need a function module that can be used for processing of idocs. The name of the fm should be Z_AS4_IDOC_INPUT_SHPMNT you should create functiongroup ZAS4 as copy of group ZS40. The functionmodule should be build on the basis of Z_S_IDOC_INPUT_ZSDELV.
Messagetype: ZASHPMNT
Idoctype: SHPMNT05
Partner: ASSIST
The purpose is to check the delivery number in Segment E1EDL20, to find the invoice in the documentflow and to select an message record of this invoice in tha table nast.
plz help..
<THREAD LOCKED. This is a forum for solving problems, not for getting other people to do your work. Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting any further questions.>
Edited by: Mike Pokraka on Oct 15, 2008 4:13 PMgreat work done in copy /paste all your functional requirement here.
Now search and get a primer on ALE / IDOCs processing and start from there -
Function Module for Customer Block
Hi Friends,
Is there any function module to block customer same as VD05?Hi,
Try the below Function Modules
SD_CUSTOMER_CHECK
SD_CUSTOMER_CHECK_1
SD_CUSTOMER_CHECK_B
SD_CUSTOMER_MAINTAIN_ALL
SD_CUSTOMER_MAINTAIN_KNKA_K
Regards,
Anki Reddy -
Function module for customer open item aging report
Hi all,
Please let me know the FM for customer open item aging or which FM is used in tcode S_ALR_87012178 to get the age wise open item of customer.
Thanks in advance
Regards
Puneet<b><u>Part4</u></b><br />
<br />
<pre class="jive-pre"><code class="jive-code jive-java"><font color="red">"&----</font>
<font color="red">"*& Form process_data</font>
<font color="red">"&----</font>
FORM PROCESS_DATA .
DATA : L_TOTAL_TMP(15). <font color="red">" LIKE BSID-DMBTR. </font>
CLEAR : L_TOTAL,LPD_TOTALS.
<font color="red">"* As per Customer accumulate the amount.</font>
<font color="red">"* For overdue items.</font>
CLEAR : L_TOTAL_TMP.
LOOP AT L_OPENDUE_LT.
CONDENSE L_OPENDUE_LT-DMBTR NO-GAPS.
L_TOTAL_TMP = L_TOTAL_TMP + L_OPENDUE_LT-DMBTR.
AT END OF KUNNR.
LPD_TOTALS-KUNNR = L_OPENDUE_LT-KUNNR.
LPD_TOTALS-LPD_TOTAL = L_TOTAL_TMP.
APPEND LPD_TOTALS.
CLEAR : L_TOTAL_TMP.
ENDAT.
ENDLOOP.
CLEAR : L_TOTAL,LOA_TOTALS.
<font color="red">"* As per Customer accumulate the amount.</font>
<font color="red">"* For Open Items.</font>
CLEAR : L_TOTAL_TMP.
LOOP AT L_OPENDUE_LE.
CONDENSE L_OPENDUE_LE-DMBTR NO-GAPS.
L_TOTAL_TMP = L_TOTAL_TMP + L_OPENDUE_LE-DMBTR.
AT END OF KUNNR.
LOA_TOTALS-KUNNR = L_OPENDUE_LE-KUNNR.
LOA_TOTALS-LOA_TOTAL = L_TOTAL_TMP.
APPEND LOA_TOTALS.
CLEAR : L_TOTAL_TMP.
ENDAT.
ENDLOOP.
<font color="red">"* Get ageing data based slabs, and duedate.</font>
PERFORM AGEING_DATA.
LOOP AT L_BSID.
<font color="red">"* Move the data to final internal table.</font>
MOVE L_BSID-KUNNR TO FINAL_DATA-KUNNR.
MOVE L_LANDX TO FINAL_DATA-LANDX.
MOVE L_PSTLZ TO FINAL_DATA-PSTLZ.
MOVE L_NAME TO FINAL_DATA-NAME1.
MOVE L_PHONE TO FINAL_DATA-PHONE.
MOVE L_SORTL TO FINAL_DATA-SORTL.
MOVE L_BSID-ZTERM TO FINAL_DATA-ZTERM.
MOVE L_BUSAB TO FINAL_DATA-BUSAB.
READ TABLE LPD_TOTALS WITH KEY KUNNR = L_BSID-KUNNR.
IF SY-SUBRC EQ 0.
MOVE LPD_TOTALS-LPD_TOTAL TO FINAL_DATA-LPD_TOTAL.
ENDIF.
READ TABLE LOA_TOTALS WITH KEY KUNNR = L_BSID-KUNNR.
IF SY-SUBRC EQ 0.
MOVE LOA_TOTALS-LOA_TOTAL TO FINAL_DATA-LOA_TOTAL.
ENDIF.
READ TABLE AGE_DATA WITH KEY KUNNR = L_BSID-KUNNR.
IF SY-SUBRC EQ 0.
MOVE AGE_DATA-CURAMT TO FINAL_DATA-CURAMT.
MOVE AGE_DATA-AMT1 TO FINAL_DATA-AMT1.
MOVE AGE_DATA-AMT2 TO FINAL_DATA-AMT2.
MOVE AGE_DATA-AMT3 TO FINAL_DATA-AMT3.
MOVE AGE_DATA-AMT4 TO FINAL_DATA-AMT4.
MOVE AGE_DATA-AMT5 TO FINAL_DATA-AMT5.
MOVE AGE_DATA-AMT6 TO FINAL_DATA-AMT6.
ENDIF.
ENDIF.
APPEND FINAL_DATA.
CLEAR: FINAL_DATA.
ENDLOOP.
ENDFORM. <font color="red">" process_data</font>
</code></pre> -
Creating a custom IDoc inbound function module
I have created a custom idoc.I wanted to create a custom IDoc inbound function module, this Function module will provide to launch a BAPI .Tell me how to "create" inbound function module for the custom idoc ?
Goto any standard for the Paramtetres
*" IMPORTING
*" REFERENCE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" REFERENCE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" REFERENCE(WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
*" REFERENCE(APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
*" REFERENCE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" REFERENCE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" REFERENCE(DOCUMENT_NUMBER) LIKE VBAK-VBELN
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
*" EDI_TEXT STRUCTURE EDIORDTXT1 OPTIONAL
*" EDI_TEXT_LINES STRUCTURE EDIORDTXT2 OPTIONAL
Do the below configs.
1.Recognise the funcmod as Inbound -BD51
2.Register the Function module in WE57 .
3.we42 Process code .
4. WE20 -PARTNER Profile
I hope it resolves ur Query.
Rgds
Sree M -
Error handling for inbound function module
Dear all,
I have written my custom function module for matmas idoc extention.In the begining of function module i have used IDOC_INPUT_MATMAS01 and then have coded my BDC.For handling errors in caese BDC fails i am filling table idoc_status. wih status 51.
But this gives eror as-
Status records with status 51 after status 53
Message no. B1357
Diagnosis
The application function module controlling the ALE inbound processing has passed several status records to ALE. The status of the last of these was '51'. Before this, a status of '53' was passed.
Procedure
If you have written the application function module yourself, you need to change the program.
Can anybody guide me how to get the exact application errors in Application log.
Thank you.Hi,
You are using BDC after the FM 'IDOC_INPUT_MATMAS01'. Right??.... The problem is, The function Module IDOC_INPUT_MATMAS01 itself posts the material and set the status '53' i.e. document posted. You can not have any error status '51' after that.
I don't understand the need of BDC in spite of the FM 'IDOC_INPUT_MATMAS01'. But if whatever the reason, you still want to use the BDC and set the status to 51, After the FM 'IDOC_INPUT_MATMAS01' call, Delete status table where status = '53'. and then proceed for the BDC... -
Sample Outbound Function Module for IDocs
Hello All,
Does anyone have sample code for an outbound function module for an IDoc - they created themselves. Custom or extended? Weblogs, sample code will be useful
ty, dd
Message was edited by:
Demi DouglasHi,
Check this program:
REPORT zmatmas_idoc.
INCLUDE zmatmas_idoc_top.
INCLUDE zmatmas_idoc_selscreen.
INCLUDE zmatmas_idoc_formroutine.
START OF SELECTION
START-OF-SELECTION.
PERFORM get_data.
PERFORM create_idoc.
PERFORM distribute_idoc.
TABLES
TABLES: mara.
Structures
*Header
TYPES: BEGIN OF gs_h_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
aenam TYPE mara-aenam,
pstat TYPE mara-pstat,
END OF gs_h_mara.
*Item
TYPES: BEGIN OF gs_i_makt,
spras TYPE makt-spras,
maktx TYPE makt-maktx,
maktg TYPE makt-maktg,
matnr TYPE makt-matnr,
END OF gs_i_makt.
TYPES: BEGIN OF gs_i_mbew,
lvorm TYPE mbew-lvorm,
lbkum TYPE mbew-lbkum,
salk3 TYPE mbew-salk3,
vprsv TYPE mbew-vprsv,
verpr TYPE mbew-verpr,
stprs TYPE mbew-stprs,
peinh TYPE mbew-peinh,
matnr TYPE mbew-matnr,
END OF gs_i_mbew.
TYPES: BEGIN OF gs_i_mvke,
vkorg TYPE mvke-vkorg,
vtweg TYPE mvke-vtweg,
lvorm TYPE mvke-lvorm,
versg TYPE mvke-versg,
bonus TYPE mvke-bonus,
provg TYPE mvke-provg,
matnr TYPE mvke-matnr,
END OF gs_i_mvke.
TYPES: BEGIN OF gs_i_mlan,
aland TYPE mlan-aland,
taxm1 TYPE mlan-taxm1,
taxm2 TYPE mlan-taxm2,
taxm3 TYPE mlan-taxm3,
taxm4 TYPE mlan-taxm4,
matnr TYPE mlan-matnr,
END OF gs_i_mlan.
*Segment & control record
DATA: gs_segment_h LIKE zmara_h,
gs_segment_i1 LIKE zmakt_i,
gs_segment_i2 LIKE zmbew_i,
gs_segment_i3 LIKE zmvke_i,
gs_segment_i4 LIKE zmlan_i,
gs_control_rec LIKE edidc.
Internal Table and work area
*Header & Item
DATA: gt_h_mara TYPE STANDARD TABLE OF gs_h_mara,
gt_i_makt TYPE STANDARD TABLE OF gs_i_makt,
gt_i_mbew TYPE STANDARD TABLE OF gs_i_mbew,
gt_i_mvke TYPE STANDARD TABLE OF gs_i_mvke,
gt_i_mlan TYPE STANDARD TABLE OF gs_i_mlan.
DATA: gw_h_mara TYPE gs_h_mara,
gw_i_makt TYPE gs_i_makt,
gw_i_mbew TYPE gs_i_mbew,
gw_i_mvke TYPE gs_i_mvke,
gw_i_mlan TYPE gs_i_mlan.
*EDIDD & EDIDC
DATA: gt_edidc LIKE TABLE OF edidc WITH HEADER LINE,
gt_edidd LIKE TABLE OF edidd WITH HEADER LINE.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS: s_matnr FOR mara-matnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
*& Include ZMATMAS_IDOC_FORMROUTINE
*& Form get_data
FORM get_data .
SELECT matnr ersda ernam laeda aenam pstat
FROM mara
INTO TABLE gt_h_mara
WHERE matnr IN s_matnr.
IF sy-subrc <> 0.
MESSAGE e003(zkaren_msgclass).
No data found according to the selection criteria
ENDIF.
IF gt_h_mara IS NOT INITIAL.
SELECT spras maktx maktg matnr
INTO TABLE gt_i_makt
FROM makt
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
SELECT lvorm lbkum salk3 vprsv verpr stprs peinh matnr
INTO TABLE gt_i_mbew
FROM mbew
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
SELECT vkorg vtweg lvorm versg bonus provg matnr
INTO TABLE gt_i_mvke
FROM mvke
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
SELECT aland taxm1 taxm2 taxm3 taxm4 matnr
INTO TABLE gt_i_mlan
FROM mlan
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
ENDIF.
ENDFORM. " get_data
*& Form create_idoc
FORM create_idoc .
*Control data
gs_control_rec-mestyp = 'ZKAR_MATMAS_MSG_TYPE'. "Message type
gs_control_rec-idoctp = 'ZKAR_MATMAS'. "IDoc
gs_control_rec-rcvprt = 'LS'. "Partner type of receiver
gs_control_rec-rcvprn = 'T90CLNT810'. "Partner number of receiver
LOOP AT gt_h_mara INTO gw_h_mara .
*Header data.
gs_segment_h-matnr = gw_h_mara-matnr.
gs_segment_h-ersda = gw_h_mara-ersda.
gs_segment_h-ernam = gw_h_mara-ernam.
gs_segment_h-laeda = gw_h_mara-laeda.
gs_segment_h-aenam = gw_h_mara-aenam.
gs_segment_h-pstat = gw_h_mara-pstat.
*Header segment
gt_edidd-segnam = 'ZMARA_H'.
gt_edidd-sdata = gs_segment_h.
MOVE gt_edidd-sdata TO gs_segment_h.
APPEND gt_edidd.
WRITE:/ gs_segment_h-matnr, gs_segment_h-ersda, gs_segment_h-ernam,
gs_segment_h-laeda, gs_segment_h-aenam, gs_segment_h-pstat.
*ITEM 1
LOOP AT gt_i_makt INTO gw_i_makt.
IF gw_i_makt-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i1-spras = gw_i_makt-spras.
gs_segment_i1-maktx = gw_i_makt-maktx.
gs_segment_i1-maktg = gw_i_makt-maktg.
*Item segment
gt_edidd-segnam = 'ZMAKT_I'.
gt_edidd-sdata = gs_segment_i1.
APPEND gt_edidd.
ENDIF.
ENDLOOP. "at gt_i_vbak
*ITEM2
LOOP AT gt_i_mbew INTO gw_i_mbew.
IF gw_i_mbew-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i2-lvorm = gw_i_mbew-lvorm.
gs_segment_i2-lbkum = gw_i_mbew-lbkum.
gs_segment_i2-salk3 = gw_i_mbew-salk3.
gs_segment_i2-vprsv = gw_i_mbew-vprsv.
gs_segment_i2-verpr = gw_i_mbew-verpr.
gs_segment_i2-stprs = gw_i_mbew-stprs.
gs_segment_i2-peinh = gw_i_mbew-peinh.
*Item segment
gt_edidd-segnam = 'ZMBEW_I'.
gt_edidd-sdata = gs_segment_i2.
APPEND gt_edidd.
ENDIF.
ENDLOOP.
*ITEM3
LOOP AT gt_i_mvke INTO gw_i_mvke.
IF gw_i_mvke-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i3-vkorg = gw_i_mvke-vkorg.
gs_segment_i3-vtweg = gw_i_mvke-vtweg.
gs_segment_i3-lvorm = gw_i_mvke-lvorm.
gs_segment_i3-versg = gw_i_mvke-versg.
gs_segment_i3-bonus = gw_i_mvke-bonus.
gs_segment_i3-provg = gw_i_mvke-provg.
*Item segment
gt_edidd-segnam = 'ZMVKE_I'.
gt_edidd-sdata = gs_segment_i3.
APPEND gt_edidd.
ENDIF.
ENDLOOP.
*ITEM4
LOOP AT gt_i_mlan INTO gw_i_mlan.
IF gw_i_mlan-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i4-aland = gw_i_mlan-aland.
gs_segment_i4-taxm1 = gw_i_mlan-taxm1.
gs_segment_i4-taxm2 = gw_i_mlan-taxm2.
gs_segment_i4-taxm3 = gw_i_mlan-taxm3.
gs_segment_i4-taxm4 = gw_i_mlan-taxm4.
*Item segment
gt_edidd-segnam = 'ZMLAN_I'.
gt_edidd-sdata = gs_segment_i4.
APPEND gt_edidd.
ENDIF.
ENDLOOP.
ENDLOOP. "at gt_h_kna1
ENDFORM. " create_idoc
*& Form distribute_idoc
FORM distribute_idoc .
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = gs_control_rec
TABLES
communication_idoc_control = gt_edidc
master_idoc_data = gt_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
IF sy-subrc <> 0.
WRITE:/ 'Error'.
ELSE.
LOOP AT gt_edidc.
WRITE:/ gt_edidc-docnum.
ENDLOOP. "at gt_edidc
ENDIF.
ENDFORM. " distribute_idoc
Maybe you are looking for
-
I'm using Sun Ultra 5/10. I'm trying to add new 250 Gb IDE hard disk. But all I can do is format 127Gb. So, I realized there is LBA limitation. Is it possible to break this threshold?
-
Where did the Charts go ???
Ok, so they were updating iTunes today. Fine. Great, in fact! But now the charts are gone! I LOVED the charts. Does anyone know where they went? Are they still accessible somewhere in the store? I have to say, if they removed them, my opinion of Appl
-
Hi All, Is there any standard TCode for Mass changes for document managmen? Regards Varma
-
Revision: 5098 Author: [email protected] Date: 2009-02-26 18:21:27 -0800 (Thu, 26 Feb 2009) Log Message: Update action script files with asdoc version tags. QE Notes: None. Doc Notes: Please review and update as necessary. tests: checkintests Modifie
-
Extracting Movie Files from Apple TV
I am going on vacation and wanted to take some of my movies that I bought and directly downloaded to Apple TV on my laptop. However, in my iTunes I am not able to access these files even when iTunes is synced with Apple TV. Any suggestions as to how