How to use BAPIs for Infopackage execution : loading multiple files
Hello
I have been told that BAPIs can be used to load multiple csv files at once for which some BAPIs exists (BAPI_IPAK_CREATE_FROM_REF , BAPI_IPAK_CREATE , etc)
I have users who will be dropping their standard files in a directory (this should be a local one or server one ?) according to one of 3 types of formats defined.
As they wont be trigering the IP but instead plan to use a Process chain need a way to collect all files and trigger a IP that can process them all
Can somebody lead me into using the appropriate ones in the right way?
thanks
First if you are using process chain then the files should be placed in Application Server only and process chain can not work with IPs which are using Local Files.
Instead of BAPI in the infopackage there is a feature to select the file using routines. May be you can pick the necessary file in the routine itself.
In the extraction tab you can find this option.
Regs
Gopi
Assign points if it is useful
Similar Messages
-
How do I search for a word through multiple files in my directories ??
Hello everyone
How do I search for a word through multiple files in my directories ??
I am guessing one tedious way to do it would be to pass all the file names as command line arguments but I"m sure there exist a much easier and faster way to do it.
Thanks a lotYou need to pass only the directory name as parameter and then retrieve the files(recursively throug subdirs or not, however you wish) of that directory.
There were at least 2 threads yesterday on how to retrieve files from directory, and there are many others in the archive so I leave the search part to you ;)
HTH
Mike -
How to use Bapi for creating sales order
Dear All,
I am facing problem in creating Sales orders using BAPI.
Actually I am getting one file as an input and after validating the contents in the file i am preparing an internal table which has 6 fields - Customer number,PO Number,Material Number,Quantity,Price,Unit of measure.
Now my doubt is that while using BAPI_SALESORDER_CREATEFROMDAT2 , I am not getting how to pass PO Number and Customer number.
Please Help.
Regards,
ShwetaHi shweta upadhyay
I have gone through you are post i have done some coding for creating sales order using bapi , I think it is helpful for you.
*& Report YOBJ_BAPI_SALESORDER
*& REPORT : CREATING SALES ORDER USING STANDARD BAPI
*& AUTHOR : S.PAVAN KUMAR INUMARTHY
REPORT YOBJ_BAPI_SALESORDER.
DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
*APPENDING VALUES FOR HEADER.
ORDER_HEADER_IN-DOC_TYPE = 'TA'.
ORDER_HEADER_IN-SALES_ORG = '1000'.
ORDER_HEADER_IN-DISTR_CHAN = '10'.
ORDER_HEADER_IN-DIVISION = '00'.
ORDER_HEADER_IN-SALES_GRP = '130'.
ORDER_HEADER_IN-SALES_OFF = '1030'.
APPEND ORDER_HEADER_IN.
*APPENDING VALUES FOR ITEM
ORDER_ITEMS_IN-MATERIAL = 'M-13'.
ORDER_ITEMS_IN-PLANT = '1000'.
ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
ORDER_ITEMS_IN-DIVISION = '07'.
ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
ORDER_ITEMS_IN-VOLUME = '0.780'.
ORDER_ITEMS_IN-VOLUNIT = 'M3'.
APPEND ORDER_ITEMS_IN.
*APPENDING VALUES FOR PARTNER
ORDER_PARTNERS-PARTN_ROLE = 'AG'.
ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
ORDER_PARTNERS-COUNTRY = 'DE'.
ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
APPEND ORDER_PARTNERS.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
ORDER_HEADER_IN = ORDER_HEADER_IN
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
IMPORTING
SALESDOCUMENT = SALESDOCUMENT
TABLES
RETURN = RETURN
ORDER_ITEMS_IN = ORDER_ITEMS_IN
* ORDER_ITEMS_INX =
ORDER_PARTNERS = ORDER_PARTNERS
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDIF.
WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
This will be very helpful for you .
this one is the correct answer I have tried it and I am posting it for you.
Message was edited by: pavan inumarthy -
Using a for loop to create multiple files ???
I have the below code. I want to make a file for every element stored in the array. How do I do this?
Vector files = new Vector();
for (int i = 0; i<files.size(); i++)
//System.out.println(files.elementAt(i));
}Not much. Are the files being created by processes on multiple hosts? If not, adding the host name and IP seem useless. Are the files being created by multiple processes and/or multiple threads on same host? If so, then the former isn't helpful. Is it possible for two threads or processes to create a file in the same millisecond - if not IMPOSSIBLE then it is possible and 99.99% chance that they won't isn't good enough. If so, then that won't work either. What if a single thread quickly creates two files in same millisecond - remember the millisecond value may not change for several milliseconds due to host system architecture.
So, I guess it depends on your requirements. -
How to use Conditional statements in SQL Loader control file
Hi,
I am using sql loader to load a flat file to the table. I am using control file for this purpose as show below:
LOAD
INTO TABLE store_shrink
TRUNCATE
FIELDS TERMINATED BY " "
TRAILING NULLCOLS
SITE_ID char,
ST_SHRINK char,
ST_REVENUE char,
SHRINK_PR char ":ST_SHRINK/:ST_REVENUE"
My question is this. If in the flat file the value of 'ST_REVENUE' is '0', then I want 'SHRINK_PR' to be '0' as well, and skip the calculation (:st_shrink/:st_revenue).
How to achieve this with the conditional statement or using any Oracle function?
Any help or suggestion is greatly appreciated.
Thanks in advance.Hi there,
I tried the following in my above query and it doesn't work somehow. Anyone has an idea? I have been on internet throughout but to no avail. Please help:
LOAD
INTO TABLE store_shrink
TRUNCATE
FIELDS TERMINATED BY " "
TRAILING NULLCOLS
SITE_ID char,
ST_SHRINK char,
ST_REVENUE char,
SHRINK_PR char "case (when :st_revenue<>'0.00' then :SHRINK_PR=:ST_SHRINK/:ST_REVENUE else :SHRINK_PR='0.00') end"
) -
How to use BAPI function module for maintaing product type to material
Hi,
Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
for maintaining the product type for the material using change number.
Pts will be rewarded.
Best Regards,
PadhyHi,
Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
for maintaining the product type for the material using change number.
Pts will be rewarded.
Best Regards,
Padhy -
How to use BAPI to add a new version for a claim number in WTY transaction.
How to use BAPI to add a new version for a claim number in WTY transaction.
I am using function module " BAPI_WARRANTYCLAIM_ADD_VERSION ".
It needs to copy all contents of previous version to a new version.
While doing so i am unable to copy fields like valic valoc etc. Any ways by which i can copy this values.
WTY will update PNWTYH , PNWTYV and PVWTY tables.
Thanking you,
Lokesh.Hi Vishnu,
You can do that through EEWB. Please go through SAP Note 484597. You would get the details of using Easy Enhancement Work bench.
Rewards point if you think this info is useful
Regards,
Dipender Singh -
Hello ! pls give some ti[ps how to use bapi's for data uploading?
hello !
pls give some ti[ps how to use bapi's for data uploading?
regards,
ArjunHi,
See the below report extract:
where it_data is having uploaded data.
LOOP AT<b> it_data</b> INTO wa_data.
line_count = sy-tabix.
"Date Validation
CONCATENATE wa_data-uplft_date4(4) wa_data-uplft_date2(2) wa_data-uplft_date+0(2)
INTO wa_data-uplft_date.
"READ TABLE it_ekko INTO wa_ekko WITH KEY lifnr = wa_data-vendor.
LOOP AT it_ekko_temp INTO wa_ekko_temp WHERE lifnr = wa_data-vendor.
IF wa_ekko_temp-kdatb <= wa_data-uplft_date AND wa_ekko_temp-kdate >= wa_data-uplft_date.
MOVE-CORRESPONDING wa_ekko_temp TO wa_ekko.
APPEND wa_ekko TO it_ekko.
ENDIF.
ENDLOOP.
"IF sy-subrc = 0 AND wa_ekko-kdatb <= wa_data-uplft_date AND wa_ekko-kdate >= wa_data-uplft_date.
LOOP AT it_ekko INTO wa_ekko.
wa_data_header-pstng_date = wa_data-uplft_date.
wa_data_header-doc_date = sy-datum.
wa_data_header-bill_of_lading = wa_data-bill_of_lad.
wa_data_header-ref_doc_no = wa_data-del_no.
CONCATENATE wa_data-header_text1 '-'
wa_data-header_text2 '-'
wa_data-header_text3 '-'
wa_data-header_text4
into wa_data_header-HEADER_TXT.
IF wa_data-indicator = 'Y'.
wa_data_item-material = '000000000000200568'.
ELSE.
wa_data_item-material = '000000000000200566'.
ENDIF.
LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln = wa_ekko-ebeln AND matnr = wa_data_item-material.
"Collect Item Level Data
wa_data_item-plant = '1000'.
wa_data_item-stge_loc = '1001'.
wa_data_item-move_type = '101'.
wa_data_item-vendor = wa_data-vendor.
wa_data-qnty = wa_data-qnty / 1000.
wa_data_item-entry_qnt = wa_data-qnty.
wa_data_item-po_pr_qnt = wa_data-qnty.
wa_data_item-entry_uom = 'KL'.
wa_data_item-entry_uom_iso = 'KL'.
wa_data_item-orderpr_un = 'KL'.
wa_data_item-orderpr_un_iso = 'KL'.
wa_data_item-no_more_gr = 'X'.
wa_data_item-po_number = wa_ekpo-ebeln.
wa_data_item-po_item = wa_ekpo-ebelp.
wa_data_item-unload_pt = wa_data-unload_pt.
wa_data_item-mvt_ind = 'B'.
APPEND wa_data_item TO it_data_item.
CLEAR wa_data_item.
ENDLOOP.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_data_header
goodsmvt_code = goodsmvt_code
testrun = 'X'
TABLES
goodsmvt_item = it_data_item
return = return.
READ TABLE return INTO wa_return WITH KEY type = 'S'.
IF sy-subrc <> 0.
DESCRIBE TABLE return LINES sy-tfill.
IF sy-tfill = 0.
CALL FUNCTION <b>'BAPI_GOODSMVT_CREATE'</b>
EXPORTING
goodsmvt_header = wa_data_header
goodsmvt_code = goodsmvt_code
testrun = ' '
TABLES
goodsmvt_item = it_data_item
return = return.
CALL FUNCTION <b>'BAPI_TRANSACTION_COMMIT'</b>
EXPORTING
WAIT = 'X'
IMPORTING
RETURN =
ENDIF.
ENDIF.
LOOP AT return INTO wa_return.
WRITE: 'Messsage TYPE ', wa_return-type,
/,'ID ', wa_return-id,
/, 'Number ', wa_return-number,
/, 'Message ', wa_return-message,
/, 'Long Text ', wa_return-message_v1,
wa_return-message_v2,
wa_return-message_v3,
wa_return-message_v4,
/, 'Failed at line', line_count.
ENDLOOP.
CLEAR: wa_ekko, wa_ekpo, wa_data, it_data_item[], wa_data_header.
ENDLOOP.
Reward if useful! -
How to update data using BAPI for MD61
Hello,
IN my zprogram i used to bapis for uploading data from flat file to sap-system
1)BAPI_requirement_create
2)BAPI_requirement_change
i)my program is taking data from my flat file but it is wipping out old data i nned to update not to overwrite is there any BAPI for this query
ii)One more thing if data is already entered in on date (i.e 10.07.2009) and when he upload data from flat file for another date same month (12.07.2009) old date data sholud not removed ...
Please reply me if my query is not understand..
Thanks in advance..Assuming you have your new requirements in table IT_REQ.
You could do something like:
DATA: it_req TYPE TABLE OF BAPISSHDIN.
DATA: l_req TYPE BAPISSHDIN.
DATA: it_req_out TYPE TABLE OF bapisitmeo.
DATA: l_req_out TYPE bapisitmeo.
* Get existing requirements
CLEAR it_req_out[].
CALL FUNCTION 'BAPI_REQUIREMENTS_GETDETAIL'
EXPORTING
material = p_matnr
plant = p_werks
requirementstype = p_bedae
version = p_versb
reqmtsplannumber = ''
TABLES
requirements_out = it_req_out[]
return = lt_return[].
* Append old requirements to requirements table
LOOP AT it_req_out INTO l_req_out.
MOVE: l_req_out-date_type TO l_req-date_type,
l_req_out-req_date TO l_req-req_date,
l_req_out-req_qty TO l_req-req_qty,
l_req_out-unit TO l_req-unit.
APPEND l_req TO it_req.
ENDLOOP.
* Change requirements
CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'
EXPORTING
material = p_matnr
plant = p_werks
requirementstype = p_bedae
version = p_versb
reqmtsplannumber = ''
vers_activ = p_vervs
TABLES
requirements_schedule_in = it_req[]
return = lt_return[]. -
How to use i for if condition in a for i in loop?
Hi friends,
I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
cursor is
select c1,c2,c3 from table1; -- 100 rows returned.
open cursor
loop
fetch c1,c2,c3 into v1,v2,v3;
for i in 1..3 loop
if 'v'||i between 90 and 100 then
v_grade := 'Excellent';
elsif 'v'||i between 80 and 89 then
elsif 'v'||i between 50 and 59 then
end if;
end loop;
close cursor;
This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
Thanks for any advice in advance!user508774 wrote:
Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
So do not underestimate what can be done in SQL.
v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
To create a SQL program with parameters is done by using bind variables. Instead of
v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
The following SQL source code should be created:
v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
Where v1 and the others are PL/SQL variables.
That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features. -
How to use bapi response in XI
HI ALL,
Can any one suggest me, how to use bapi response in XI as a sender.
I m using bapi BAPI_BCA_BANKSTATEMENT_EXECUTE , I am executing this bapi manually ,but want to use this BAPI RESPONSE in XI as a sender and map it with receiver.
can i have any idea about how to do it, or can i have the idoc which is used by this bapi BAPI_BCA_BANKSTATEMENT_EXECUTE.
THANX
HONEYHi Honey,
Have a look at these
-Configuring the Sender RFC Adapter - step by step
/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
-Troubleshooting - RFC and SOAP scenarios
/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
-sender RFC (forum thread)
Is it possible to use the RFC sender adapter for asynchronous calls?
Regards,
Sreenivas -
How to use BAPI with Decision Dialogue
Hi Gurus
would you please let me know how to use BAPI with decision dialogue in guided procedure .
I have a BAPI checking logon credentials for the user . how to use this BAPI for making decisions that is if the logon is correct then perform one process else go to logon screen again .
Thanks in advance
Regards NamitaHi Namita,
1. Follow the steps mentioned in section <a href="http://help.sap.com/saphelp_crm50/helpdata/en/33/198141f906040de10000000a1550b0/frameset.htm">Exposing an RFC-Enabled Function Module as a Callable Object</a> to use the BAPI as a Callable Object.
2. Follow the steps mentioned in tutorial # 93 and 93a in the CAF Tutorial Center for the decision part.
Hope these helps.
Nilay -
Hi
How to use bapis
BAPI_COMPANYCODE_GET_PERIOD
BAPI_CCODE_GET_FIRSTDAY_PERIOD'
BAPI_GL_ACC_GETPERIODBALANCES'BAPI_COMPANYCODE_GET_PERIOD:
To retrieve the fiscal year variant for a given date u can use the following function module
Retrieve fiscal year and period
The below code shows how to use function modules BAPI_COMPANYCODE_GET_PERIOD and
DETERMINE_PERIOD to retrieve fiscal year and fiscal period for a specific date.
*: Report: ZFISCALYR :
*: Author: www.SAPdev.co.uk :
*: Date : 2004 :
*: Description: Demonstrates how to return the corresponding fiscal :
*: year and posting period for a company code and posting :
*: date or posting date and fiscal year variant. :
REPORT zfiscalyr NO STANDARD PAGE HEADING.
TABLES: ekko.
PARAMETERS: p_bukrs TYPE ekko-bukrs,
p_bedat TYPE ekko-bedat.
DATA: gd_fiscalyr TYPE bapi0002_4-fiscal_year,
gd_fiscalp TYPE bapi0002_4-fiscal_period.
DATA: gd_fiscalyr2 TYPE T009B-BDATJ,
gd_fiscalp2 TYPE bapi0002_4-fiscal_period.
DATA: gd_periv TYPE t009-periv.
*START-OF-SELECTION.
START-OF-SELECTION.
get fiscal year and period - (requires date and company code)
CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
EXPORTING
companycodeid = p_bukrs
posting_date = p_bedat
IMPORTING
fiscal_year = gd_fiscalyr
fiscal_period = gd_fiscalp.
Alternative fiscal year function module
- (requires date and fiscal year variant code from T009 table)
gets first entry in fiscal year variant table (will need to choose
correct one from table rather than just using first entry)
SELECT SINGLE periv
FROM t009
INTO gd_periv.
get fiscal year and period
CALL FUNCTION 'DETERMINE_PERIOD'
EXPORTING
date = p_bedat
PERIOD_IN = '000'
version = gd_periv
IMPORTING
period = gd_fiscalp2
year = gd_fiscalyr2
EXCEPTIONS
period_in_not_valid = 1
period_not_assigned = 2
version_undefined = 3
OTHERS = 4.************************************************************************
*END-OF-SELECTION.
END-OF-SELECTION.
WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',
/ 'Fiscal year is:', gd_fiscalyr,
/ 'Fiscal period is:', gd_fiscalp.
SKIP.
WRITE:/ 'From function module: DETERMINE_PERIOD',
/ 'Fiscal year is:', gd_fiscalyr2,
/ 'Fiscal period is:', gd_fiscalp2.
how to get the fiscal year
BAPI_CCODE_GET_FIRSTDAY_PERIOD:
CALL FUNCTION 'BAPI_CCODE_GET_FIRSTDAY_PERIOD'
EXPORTING
companycodeid = v_bukrs
fiscal_period = marv-lfmon
fiscal_year = marv-lfgja
IMPORTING
first_day_of_period = v_postdate
return = i_return1.
BAPI
function module which could calculate the previous month's start date.....
BAPI_GL_ACC_GETPERIODBALANCES:
Transactions or BAPI for GL account
Please give me reward point... -
How to Use BAPI_OUTB_DELIVERY_CHANGE for Batch Split
Hi Experts, I have the follow delivery:
Item Material Deliv.Qty Un
10 739911 2 PQT
And I want to obtain this:
Item Material Deliv.Qty Un Batch
10 739911 0 PQT
900001 739911 1 PQT ZZ00060
900002 739911 1 PQT ZZ00061
But, after using the Bapi I obtained this:
Item Material Deliv.Qty Un Batch
10 739911 1,372 PQT
900001 739911 0,314 PQT ZZ00060
900002 739911 0,314 PQT ZZ00061
So as you can see the problem is with the "Deliv.Qty". I expected:
Item Deliv.Qty
10 0
900001 1
900002 1
But I obtained:
Item Deliv.Qty
10 1,372
900001 0,314
900002 0,314
The parameters that I am using in the Bapi are:
HEADER_DATA
DELIV_NUMB = 801174646
HEADER_CONTROL
DELIV_NUMB = 801174646
DELIVERY = 801174646
TECHN_CONTROL
UPD_IND = U
ITEM_DATA (three records):
DELIV_NUMB = 801174646
DELIV_ITEM = 000010
MATERIAL = 739911
FACT_UNIT_NOM = 1
FACT_UNIT_DENOM = 1
DELIV_NUMB = 801174646
DELIV_ITEM = 900001
MATERIAL = 739911
BATCH = ZZ00060
HIERARITEM = 000010
USEHIERITM = 1
DLV_QTY = 1
DLV_QTY_IMUNIT = 1
FACT_UNIT_NOM = 1
FACT_UNIT_DENOM = 1
DELIV_NUMB = 801174646
DELIV_ITEM = 900002
MATERIAL = 739911
BATCH = ZZ00061
HIERARITEM = 000010
USEHIERITM = 1
DLV_QTY = 1
DLV_QTY_IMUNIT = 1
FACT_UNIT_NOM = 1
FACT_UNIT_DENOM = 1
ITEM_CONTROL (three records):
DELIV_NUMB = 801174646
DELIV_ITEM = 000010
CHG_DELQTY = X
DELIV_NUMB = 801174646
DELIV_ITEM = 900001
CHG_DELQTY = X
DELIV_NUMB = 801174646
DELIV_ITEM = 900002
CHG_DELQTY = X
So I am missing something but I don't know what.
Can any one help me with this please?
PD: I have looked the following forums in order to use the Bapi:
How to Use BAPI_OUTB_DELIVERY_CHANGE for Batch Split
batch split using BAPI_OUTB_DELIVERY_CHANGE
Re: Help in BAPI_OUTB_DELIVERY_CHANGE(batch-split)
BAPI_OUTB_DELIVERY_CHANGE - Batch Splits don't work
Help for BAPI_OUTB_DELIVERY_CHANGEHey,
My code is for the inbound delivery but it should work the same.
Give this a try.
REPORT z_delivery_batch_split.
DATA:header_data LIKE bapiibdlvhdrchg,
header_control LIKE bapiibdlvhdrctrlchg,
delivery LIKE bapiibdlvhdrchg-deliv_numb,
ls_return LIKE bapiret2,
item_data TYPE TABLE OF bapiibdlvitemchg,
item_control TYPE TABLE OF bapiibdlvitemctrlchg,
ls_item_data LIKE bapiibdlvitemchg,
ls_item_control LIKE bapiibdlvitemctrlchg,
return TYPE TABLE OF bapiret2 WITH NON-UNIQUE KEY type.
header_data-deliv_numb = '1800005005'.
header_control-deliv_numb = '1800005005'.
delivery = '1800005005'.
ls_item_data-deliv_numb = '1800005005'.
ls_item_data-deliv_item = '900001'.
ls_item_data-material = '000000000020067722'.
PERFORM create_batch CHANGING ls_item_data-batch.
ls_item_data-hieraritem = '000010'.
ls_item_data-usehieritm = '1'.
ls_item_data-dlv_qty = 80.
ls_item_data-dlv_qty_imunit = 80.
ls_item_data-fact_unit_nom = '1'.
ls_item_data-fact_unit_denom = '1'.
ls_item_data-sales_unit = 'EA'.
ls_item_data-base_uom = 'EA'.
APPEND ls_item_data TO item_data.
ls_item_data-deliv_numb = '1800005005'.
ls_item_data-deliv_item = '900002'.
ls_item_data-material = '000000000020067722'.
PERFORM create_batch CHANGING ls_item_data-batch.
ls_item_data-hieraritem = '000010'.
ls_item_data-usehieritm = '1'.
ls_item_data-dlv_qty = 60.
ls_item_data-dlv_qty_imunit = 60.
ls_item_data-fact_unit_nom = '1'.
ls_item_data-fact_unit_denom = '1'.
ls_item_data-sales_unit = 'EA'.
ls_item_data-base_uom = 'EA'.
APPEND ls_item_data TO item_data.
ls_item_control-deliv_numb = '1800005005'.
ls_item_control-deliv_item = '900001'.
ls_item_control-chg_delqty = 'X'.
APPEND ls_item_control TO item_control.
ls_item_control-deliv_numb = '1800005005'.
ls_item_control-deliv_item = '900002'.
ls_item_control-chg_delqty = 'X'.
APPEND ls_item_control TO item_control.
break cgavin.
CALL FUNCTION 'BAPI_INB_DELIVERY_CHANGE'
EXPORTING
header_data = header_data
header_control = header_control
delivery = delivery
* TECHN_CONTROL = TECHN_CONTROL
TABLES
* HEADER_PARTNER = HEADER_PARTNER
* HEADER_PARTNER_ADDR = HEADER_PARTNER_ADDR
* HEADER_DEADLINES = HEADER_DEADLINES
item_data = item_data
item_control = item_control
* ITEM_SERIAL_NO = ITEM_SERIAL_NO
* EXTENSION1 = EXTENSION1
* EXTENSION2 = EXTENSION2
return = return
* TOKENREFERENCE = TOKENREFERENCE
* HANDLING_UNIT_HEADER = HANDLING_UNIT_HEADER
* HANDLING_UNIT_ITEM = HANDLING_UNIT_ITEM
* PARTIAL_GR_OBJECTS = PARTIAL_GR_OBJECTS
READ TABLE return
INTO ls_return
WITH TABLE KEY type = 'E'.
IF sy-subrc = 0.
MESSAGE ID ls_return-id TYPE ls_return-type NUMBER ls_return-number WITH ls_return-message_v1 ls_return-message_v2
ls_return-message_v3 ls_return-message_v4.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
break cgavin.
*& Form CREATE_BATCH
* text
* <--P_LS_ITEM_DATA_BATCH text
FORM create_batch CHANGING p_ls_item_data_batch.
DATA: ls_bncom TYPE bncom.
ls_bncom-matnr = ls_item_data-material.
ls_bncom-werks = 'C333'.
ls_bncom-lgort = '3000'.
SELECT SINGLE mtart
FROM mara
INTO ls_bncom-mtart
WHERE matnr = ls_bncom-matnr.
CALL FUNCTION 'VB_NEXT_BATCH_NUMBER'
EXPORTING
matnr = ls_bncom-matnr
werks = ls_bncom-werks
check_batch = 'X'
check_material = ''
message_when_auto = ' '
x_bncom = ls_bncom
lock_batch = ' '
IMPORTING
new_charg = p_ls_item_data_batch
EXCEPTIONS
no_material = 1
no_plant = 2
material_not_found = 3
plant_not_found = 4
no_batch_handling = 5
batch_exist = 6
no_number = 7
illegal_batch_number = 8
interval_not_found = 9
object_not_found = 10
interval_overflow = 11
error_automatic_batch_number = 12
cancelled = 13
automatic_batch_num_not_active = 14
OTHERS = 15.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
ENDFORM. " CREATE_BATCH -
How to Use 'uid' for AD Users Without Domain Name For User Log in OAM
How to Use 'uid' for synchronized Active Directory (AD) Users into Oracle Internet Directory (OID) Without Domain Name For User Logins in OIDDAS and OAM
We successfully integrated OAM 11g with EBS R12.1.3 Now all the AD user id's stored in fnd_users table as [email protected]
How can we remove @abc.com
We are using OID 11g and OAM 11g
Found the similar note for OID 10G: How to Use 'uid' for AD Users Without Domain Name For User Logins in OIDDAS and SSO [ID 580480.1]
We are in OID 11g.
Any help on this greatly appreciated.I couldn't find any reference that could be helpful -- Please log a SR and see if this is supported and if the steps are available.
Thanks,
Hussein
Maybe you are looking for
-
Considering Updating my Contribute 3...
BUT.........Here are a few questions: 1. Will I be able to edit forms? such as a contact form? with a submit button....say change the email it goes too? 2. Will it MESS with existing forms and make them unusable? 3. Does is have any text formatting o
-
Hi, I tried to setup my printer with the ptal-init setup script, but it failed to communicate with the printer, this is the output of the command: [gnu_d@kolg ~]$ sudo ptal-init setup -v Password: Stopping the HP OfficeJet Linux driver. This program
-
How to omit showing while the value is 0.00
Hi dear friends I am now using a very very simple multıple without java and any special code. By just the simple Multiple Fuction of Adobe Acrobat Pro. I want the field to be compeletly off when its equalling 0. NO that I am usıng somehow the functıo
-
Hi, We are planinng to use Downpayment for direct acquisitions (not AUC) But, the problem is depreciation is getting calculated fot tty 180 and reversing for 181 where as we don't want any depreciation to be calculated for downpayments (if we deactiv
-
Hi All - I have added new field in existing Maintenance view and I have regenerated the table maintenece generated. The view had APPLK (Application area) application filed earlier which was showing field value, but after i re generated the view its