Variables passed to Function module for posting the Idoc
Hi,
For Posting the Inbound Idoc a Function module is created what should be the values passed to
1) return_variable and
2) workflow_result.
I saw in many of the program like this if there is an error in posting.
I gave return_variable-wf_param = ' Error Idoc'.
and workflow_result = '99999'.
Why are these values passed, where are they used.
Josephine,
In your parntner profile for your customer/vendor ( depending on your idoc type and business scenario) , you would have assigned the post processing permitted agent.
In case the function module errors out, these values are carried out to the WF container and appropriate post processing notifications are sent to the agents. That is the purpose of having these variables in here.
It could be a success/failure, agents are notified in either case.
Ganesh
Similar Messages
-
Function Module for Posting the Delivery Doument
Dear Experts,
Could you please send me the Function Module for Posting the Delivery Doument.
Thanks & Regards,
Ashok.Hi,
What do you mean by POSTING the delivery document?
Are you mentioning the creation of Goods Issue? -
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 -
Sample coding for creating a function moudle to post the Idoc
hi,
I am working on Inbound idoc,
Aim : to update the Ztable
I have created the message type , idoc type and the segment type.
For creating an idoc i have used the Function module IDOC_INBOUND_WRITE_TO_DB.
Now for posting the idoc, i need to create the function module, the main aim is to insert record to the Ztable, what should be my input and the output parameters,
Can u provide the sample coding for itAs you are dealing with a IDOC, the parameters will have to be standard as any other IDOC processing function module. For example take a look at IDOC_INPUT_BANK_CREATE.
You will have to read the data exactly the way the standard code does and the only change will be once you read the data how do you want to handle the data.
Regards,
Ravi
Note : Please mark all the helpful answers -
Creation of function module for updating the ztable
Hi,
I am sending the requirement for ceation of function module for updating the ztable.
Requirement----
Table Updation rule (New record)
While creating a new record the calling function will export the following to the table handling function.
Table field Probable Values
ZORDERNO-------> Sales Delivery no in case of sales orderShipment no in case of transfer order
UNAME----
> User ID
ZORDTYPE----
> SALEOR in case of sales orderTRANSF in case of transfer order
ZREFDOCNO----
>Sales Order no in case of sales orderPurchase Order no in case of transfer order
ZREFDOCNO1----
>Delivery no in case of transfer order
The table handling function will calculate the following fields
Table field Probable Values
ZREQNO----
>Running serial number (incremented by 1 for each new record)
ZREQDAT -
>System date
ZREQTIME----
> System time
ZSTATUS----
>OPEN (for all new records)
Before inserting a new record the table handling function will always check if a previous record exists for the same order / shipment no. if record exists the function will not insert a new record.
Table Updation rule (Status Update)
While updating a record the calling function will export the following to the table handling function.
Table field Probable Values
ZORDERNO----
>Sales order no in case of sales orderShipment no in case of transfer order
ZSTATUS----
>CANCEL if cancellation successfulERROR if cancellation not possible (order already processed)
The table handling function will calculate the following fields
Table field Probable Values
ZSTATDAT----
>System date
ZSTATTIME----
> System timeDo you have to create/update new record in Ztable through Function Module ?
or you need to write FM only for validation?
Any how, you need to create a Program with Input values for the fields of Ztable, and for rest of fields the Value can be calculated based on input as per your requirement.
Let me know clearly what exactly u need ?
Regards,
Kiran -
Function module for converting the foreign currency to words
hi,
can anybody tell me about the function module for converting the foreign currency to words format.
Like 25.50 USD
should be "Twenty Five Dollar & Fifty Sents."
foreign currency can be anyone like USD, JPY, EUR etc.
Regards
Nitin VarshneyHi,
Try using the FM SPELL_AMOUNT
Check this wiki
[SPELL_AMOUNT|https://wiki.sdn.sap.com/wiki/display/Snippets/SpelltheAmountenteredin+words]
Regards
Sarves -
Function module for displaying the location
Hi,
Could anyone tell the Function module for displaying the location in our system without a file name while downloading, when the user press f4.
thanks* read the default pathname on application server
call function 'FILE_GET_NAME'
exporting
* CLIENT = SY-MANDT
logical_filename = lc_logical_filename_ftappl
operating_system = sy-opsys
* parameter_1 = ' '
* PARAMETER_2 = ' '
* USE_PRESENTATION_SERVER = ' '
* WITH_FILE_EXTENSION = ' '
* USE_BUFFER = ' '
importing
emergency_flag = l_emergency_flag
file_format = l_file_format
file_name = l_file_name_ftappl
exceptions
file_not_found = 1
others = 2. -
Standard function module for checking the sales organization and plant
Hi all,
Does have standard function module for checking the relationship between sales organization and plant?
Thanks a lot!
Ninahi
good
check these BAPIS
BAPI_SALESGROUP_GET_DETAIL Sales Group: Display Name
BAPI_SALESOFFICE_GET_DETAIL Sales Office: Display Name
BAPI_SALESOFFICE_GRP_EXIST Sales Office / Sales Group: Existence Check
BAPI_SALESORG_EXIST Sales Organization: Existence Check
BAPI_SALESORG_GET_DETAIL Sales Organization: Display Data
BAPI_SALESORG_OFFICE_EXIST Sales Organization / Sales Office: Existence Check
PLANT=>
BAPI_PROMO_GETSITEPLANNING Detailed Data for the Plants Involved in a Promotion
thanks
mrutyun^ -
Function Module for getting the Sales Price for a condition type
Hi,
I am looking for a standard function module to which I can pass my condition type(new customizing) and it will return the sales price. The customer is going to create some new condition type to manitain the sales price. I'll have the necessary information like material/sales org/distribution channel, customer and need the standard function module to read the condition records for that condition type(as configured) and give me the price. PLease help if you know of a standard function module performing this.
Thanks in advance.
Regards
MalthiHi malthi ,
welcome to sdn
for material sales area u can look for the validations is table MVKE.
the classification of the conditions is in tables like A901, a902 etc which in my opinion holds the condition types per classification .
put a A* in se11 and this will give the list of tables per classification .
u need to get the conditions as per kschl and dmbtr and
etc..
like this ..
Get Condition Values for Material/Plant combination
IF NOT i_a916[] IS INITIAL.
SELECT knumh kappl kschl krech
kbetr konwa kpein kmein
INTO TABLE i_konp
FROM konp
FOR ALL ENTRIES IN i_a916
WHERE knumh EQ i_a916-knumh AND
kappl EQ i_a916-kappl AND
kschl EQ i_a916-kschl AND
loevm_ko NE 'X'.
ENDIF.
Get Condition Values for Material/Plant/Ordertype/
Customer combination
IF NOT i_a925[] IS INITIAL.
SELECT knumh kappl kschl krech
kbetr konwa kpein kmein
APPENDING TABLE i_konp
FROM konp
FOR ALL ENTRIES IN i_a925
WHERE knumh EQ i_a925-knumh AND
kappl EQ i_a925-kappl AND
kschl EQ i_a925-kschl AND
loevm_ko NE 'X'.
ENDIF.
just check this Fm if u can apply ur condition over here ..
ME_GET_PRICE_CONDITION
regards,
VIjay. -
Function Modules for uploading the file
Hi experts ,
I have a requirement to download a file (csv) from my local sytem (say desktop) into an internal table first and then update the contents of the same internal table into the database table.
Can anybody provide me with a sample program for doing the same or at least the name of function modules for the same.
Prompt replies will be rewarded.
TIA
AbhishekHi Abhishek,
How to use INSERT Statement..
Check this Sample Program..
TABLES:MARA.
DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
ITAB-MATNR = '123ABCDA'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
ITAB-MATNR = '123ABCDB'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
LOOP AT ITAB.
INSERT MARA FROM ITAB.
MODIFY MARA .
ENDLOOP. -
Function module for getting the all PO waiting for release
Hi,
Is there any standard Function module for gettting all the PO's which all waiting for release.
Regards
Bala.hi Bala,
ECC 6.0 Exits for VA01
go through the above link i think that will help u...
Regards,
sindhu. -
Function Module For Upload the Powerpoint Template in Webdynpro ABAP
Hi,
Can anyone tell me, is there any standard function module to upload the Powerpoint Template to Webdynpro ABAP.
Regards,
SaranHello Saran,
for uploading the powerpoint as file you could use the FileUpload ui element.
Best regards,
Thomas -
Wt parameters to pass in function module for particular kunnr fld
wt parameters to pass in function module f4if_int_table_value_request which is mostly preferred in reports instead of search help
for eg i use select-options s_kunnr for kna1-kunnr & prepare i internal table it_kna1.
den how 2 pass s_kunnr fld & it_kna1 in dat above FM for creating f4 functionality for particular s_kunnr fld on selection-screen.
plz send me d code urgentlyCheck below code....
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF. -
Functional module for determining the sales tax code
Dear all,
Kindly help me is there any Functional module to determine the sales tax code?
My Requirement is Based on the Country, Sales Org and Tax code Pricing should pick up automatically.
I tried adding the same fields in the table and inserted in the access sequence and created the condition record for the same.
Created the order but system is not able to get the Tax code while determining the price?
Please help ...
Regards,
SKMy Requirement is Based on the Country, Sales Org and
Tax code Pricing should pick up automatically
but system is not able to get the Tax code while determining the price?
Your both the above comments are contradict to each other. In the first statement, you say pricing should pick up automatically whereas, in the next statement, you say tax code is not determining. Please indicate the requirement clearly.
thanks
G. Lakshmipathi -
DDIF Function Module for getting the description of a BAPI structure
Hi,
I need to find a function module that returns the description of a structure...well a BAPI structure, not that that makes any difference.
The DDIF_ function modules I've tried will all return the descriptions of data elements in tables, but not structures.
Thanks,
TristanCheck FM : CACS_DBNAME2TABNAME
Maybe you are looking for
-
Why does SQL bring back all values in a single condition quicker?
Hi All, I've stumbled across an interesting yet frustrating problem with one of our Discoverer Reports. The problem unfortunately is related to performance, which can be a never-ending struggle, as we all know. Scenario: We have a report that contain
-
Oracle Client in Citrix Server
It is fail to install Oracle8i Client Release 3 (8.1.7) in our Citrix Metaframe server via Add/Remove programs. After I select the location of Client 8i installation path and press Next button, nothing was appeared. The oracle client installation nev
-
Retrieving the Full Path of the Document / Folder in Search results
Hello, We have a custom portlet to perform search in knowledge directory. We are able to retrieve the results from knowledge directory and would like to know on one enhancement feature. Would like to know if it is possible to retrieve the directory s
-
Networking troubles with windows machine
I've got this setup: arch linux machine with eth0 connected to dsl modem and eth1 connected to a win7 machine. the linux machine has a samba share on it which i can't really access on the win7 machine. i can access it, but i can't open anything which
-
A problem taking images with a PCI 1409
Hello all, I've a CCD camera throug I try to acquire images by a PCI 1409 card. Im configuring the device throug MAX and seens to work fine, but when I'm using the snap block or minor level I cant see anything, the image turn black. I've search in ot