Order data Structure in BAPI_PRODORD_CREATE Function module
Dear Sir,
I am using the function code ' BAPI_PRODORD_CREATE ' to create a number of production order from the data reside in the tab delimited file in the system. i am not able to pass the structure order data to this function module , there is a error CALL_FUNCTION_CONFLICT_LENG ' error. what will be the format of the structure.
I want to create production order from the list in excel file . I have only material code , production plant , order type , quantity as input.
regards,
Kapil.
Please update the issue.
Similar Messages
-
Generic data extractor using a function module
Hi All,
I want to create a generic data extractor using a function module within the BW system. i.e. the extractor will run in BW and and store the data in a cube( in BW). No R/3 is invloved. I proceeded as follows:
1. Created a structure through se11.
2. Created a function module. But while defining "E_T_DATA" in the "Tables" section of the function module, I am getting the error "TABLES parameters are obsolete". I defined as follows:
E_T_DATA TYPE ZBW_EXTRACT
ZBW_EXTRACT is the name of the structure.
What should i do in this case ?
Thanks,
SatyaHello Satya,
The message "TABLES parameters are obsolete" is just a warning and not an error. The structure of the interface is strict (defined by SAP). You should opt to proceed even if you receive the warning.
Hope this clarifies. -
Data source enhancement thru function module
Folks,
I am trying to figure relation between data source enhancement, package, function module etc?
I see a function module where enhancement is done. when I go and try to see master data exit EXIT_SAPLRSAP_0002 ... I see include but I do not see reference of function module in this include?
All these codes are so simple... but I am struggling to figure out all these relation RSAP0001, exit_saplrsap* - include inside and function module attached?
Can somebody give very simple connection for all these components?
Thanks,
-SMHi,
All these codes are so simple... but I am struggling to figure out all these relation RSAP0001, exit_saplrsap - include inside and* function module attached?
Please note that for enhancing certain standard objects for meet customer needs, SAP provides different customer exits where we can code as per our requirements.
These customer exits starting with EXIT********* will be grouped by Enhancements e.g. RSAP0001
Thanks for your response. In RS02 it is clear that we can mention function module name for data source - that is good for generic extraction. But what do we do when we are enhancing SAP extractor?
When you want to enhance SAP extractors, you go for customer exits.
EXIT_SAPLRSAP_001 for Transactional datasources
EXIT_SAPLRSAP_002 for Master datasources
EXIT_SAPLRSAP_003 for Text datasources
EXIT_SAPLRSAP_004 for Hierarchy datasources
in se37 screen in table tab - sometime we see extract structure - that will establish which functional being called for which data source, but in my case - I do not see anything in table tab?
If your datasource is function module based, then the function module which is mentioned in RSO2 for your datasource would surely have e_t_data in tables tab with its associated type.
Only if the datasource is standard one and is processed by function module e.g. 2lis_18_i0notif which is processed by MCEX_BW_LO_API function module, these would not have associated type mentioned for them. To get their structure, you can go to RSA5/ RSA6 -
Problem with R/3 Data Source based on Function module in SAP BI
Hi,
We have a data source based on functional module. When we load data from R/3 to BI we face the following error.
" No end-confirmation arrived in the Warehouse from the source system."
We are getting data but due to no end confirmation from the source system, the load become timed-out and status becomes "RED". When we change the status to be "GREEN" and proceed tha load further, load is fine.
Please suggest us a suitable solution.
Thanks in Advance,
GeethaHi Geetha Devi Ramalingam.
I faced the same problem since yesterday. I just resolve the issue.
So here is my solution :
try this code :
FETCH NEXT CURSOR s_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE e_t_data
PACKAGE SIZE s_s_if-maxsize.
IF sy-subrc <> 0.
CLOSE CURSOR s_cursor.
RAISE no_more_data.
ENDIF.
if you add your
bold
IF sy-subrc <> 0.
CLOSE CURSOR s_cursor.
RAISE no_more_data.
ENDIF.
bold
than the sy-subrc may be equal and than your CLOSE CURSOR s_cursor. will have no effect
it work for me hope it will for u
Hard luck!
Salah
Edited by: idrissi salaheddine on Jan 19, 2012 12:24 PM -
Creating a Structure for BAPI Function Module
Hi,
I need to create an RFC for a BAPI call. For that I have to create a structure for the function module. Now, do I need to specify both import and export parameters in the same structure or do I need to create two different structures for Import as well as export parameters? If the import and export parameters are specified aleady, Do I need to supply this structures again under "TABLES"?
Thanks,
John.if u have/get more one records , then u have to use tables ?
Regards
Prabhu -
Date of creation of function module
Hi Guys,
is there any possibility to find out the date of creation of a function module.
For programs, it can be found in the table TRDIR. But I cant find any table for function modules.
ErikTFDIR will give you the name of the function group program and the include number.
E.g. SAPLZFUNCGROUP Include 01.
From this you can construct the include name: LZFUNCGROUPU01.
You can look this up in TRDIR to find the creation date (CDAT) of the function module.
matt -
Getting Data from Structure and Store Data into Table using Function Module
Hello...
we are created a function module to import 2 structures in the systems and want to read the data from the structure into a customized table when the fucntion module is called. However, whenever the function module is run, we only managed to have one data into the customized table whereas the actual results is that there will be a few records in this customized table.Hi,
It should be something like this...
TABLES ZRESMORT.
DATA E_ZRESMORT TYPE STANDARD TABLE OF ZRESMORT WITH HEADER LINE.
SELECT * FROM ZRESMORT. <=====================
DELETE ZRESMORT. <================== It is deleting all the records in your Z table
ENDSELECT. <===============================
Loop at I_CKF_CONTRACT. " Assuming this is the Main Table
Read table I_CKF_PROCESS with key ." Here you will read this table to get the corresponding records of Table I_CKF_CONTRACT
E_ZRESMORT-MORT_FT_ID = I_CKF_CONTRACT-COMMON-CONTRACT_ID_EXT.
E_ZRESMORT-MORT_KDATE = I_CKF_PROCESS-TECHNICAL-KEY_DATE.
E_ZRESMORT-MORT_TSTAMP = I_CKF_PROCESS-TECHNICAL-TIMESTAMP.
E_ZRESMORT-MORT_FLAG = 1.
E_ZRESMORT-MORT_BUPA = I_CKF_CONTRACT-BUPA-BUSINESS_PARTNER_ID.
E_ZRESMORT-MORT_PORTFO = I_CKF_CONTRACT-BUPA-PORTFOLIO_CAT.
E_ZRESMORT-MORT_FT_ID_DUM = I_CKF_CONTRACT-COMMON-CONTRACT_ID.
INSERT INTO ZRESMORT VALUES E_ZRESMORT.
IF SY-SUBRC EQ 0.
ENDIF.
endloop. -
Data Services XI3.1 function module files for SAP R/3 is not working
Hi guys,
Thank you for the quick response so far. I am very grateful to you all.
I got an issue and will try to explain as detail as I could and
hope ur guys won't mind. :P
I pass the functions module to SAP tech guy to install to SAP using CTS
method, and using 900086.R63 file type because my chinese client is
running SAP on unicode environment.
My DS installed on my laptop client; job server plus db2 is on HP
unix. SAP is on another HP Unix server. The function module I used is
supplied from Data Services XI3.1.
Anyway, the installation is successfully done with GUI wizard windows of
SAP Workbench instead of tp command line method.
1)However, I checked the ZAW0 function group, I opened and can't see any functions
listed under it, although the table structures ZACTA, ZTAB2048 and other items
were created.
2)So I tried to create SAP Datastore, Transport Target, etc and tried to
extract file. It failed and log said "can't open file ---
/db2/temp/curcode.txt". I checked and SAP working directory /db2/temp didn't have
curcode.txt, because the result file supposed to be extracted and stored there.
The SAP tech guy checked SAP and cant find generated ABAP program of
ZCURCD is running anyway, although my local CURCD ABAP program is
created.
3)Is it the 900086.R63 not complete? Is my function installation correct? I could view data
on datastore, but just cant run job to extract. Another non-unidcode 900200.S08 group
has larger file sizes. Should I try to install also this 900200.S08 files? Will it corrupt SAP
and cause system errors?
4)After that, I had tried to install the functions manually into ZAW0
one by one using cut and paste, however after that, I cant view the data view anymore with
error. Besides, I tried to run Check on the functions and they all returned
syntax errors, so I cant Activate any of them with SAP. Maybe dependency is missing??
Then, I deleted the manually installed functions and can view data again, but just cant extract
data by job.
5)Another side issue is all these SAP datastore creation and viewing is
through DI 11.5 old installation. The new Data Services X3.1 unable to
create datastore with database error, although the function module
installed is came from Data Services. Does anyone know the issue?
Thank you very much to read it patiently. :PHi,
Thank you for the informative link. It did help a lot in solving the problem.
(1) to (4) --- The Sap tech guy didnt install the function programs correctly, and he redo the transport again using CTS. Now I can see all the functions inside the function group ZAW0. While for the problem of cannot generate extracted file to SAP working directory for downloading, it is due to unix directory access permission setting. And also have to include the ftp username into SAPSYS user group as the help link suggested.
(5) For this problem, I reinstalled again the DS with all required components like Server Manager. The network technical guy helped me with the first installation, and the installation was not complete. So now the issue is solved, I can create R/3 Datastore with DS. -
Use of structure ICL_SFC_DI in function module ICL_CLAIM_DI
Hi.
We are using function module ICL_CLAIM_DI to create claims and we want to add data to some SFC fields, the function module has a structure called ICL_SFC_DI for creation of the fields.
In some of our SFC fields the answer is declared as a "Free Text" field, but i cant seem to find a field in the ICL_SFC_DI structure to fill in the free text?
Regards LiselotteHi,
I'm more into functional side of claims management, however will attempt to answer this question.
The Free text of an SFC and a normal options, both share the same field :
Answer / BSFC_ANSWER / ICL_SFC_DI
Value Range Table: TBSFC002
Hope this helps.
Regards,
Anish -
Pushing data in packets from Function Module to BW
Hi All,
I have been struggling with a problem for about a week and a half and I find myself at an in-pass. I firstly created a function module to pull data from SAP and join multiple tables so I could use it to report in Crystal. The problem was that it was so much data that I received errors due to processing time.
Thus to solve this problem I now use the function module to push data into a datasource so that it executes in the background.
The main problem I am experiencing is how to code a function module so that it will retrieve the data in segments then commit then retrieve next segment. At the moment the program works but if the data increases like it should I will run into the no more space in the internal table error.
Example of my code below. (much simplified to just demonstrate functionality). Sorry that it is still long but didn't want to leave out parts that might be important.
So how would one get the data to retrieve from the SAP tables and commit to BW in segments instead of like I do to retrieve all the data then pump into BW in segments.
FUNCTION ZBOBJ_COMMISSION.
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZDGB_COMMISION_REPORT OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
STATICS : counter type i.
** Example: DataSource for table SFLIGHT
TABLES: ZDGB_COMMISION_REPORT.
** Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
** Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
** counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
** cursor
S_CURSOR TYPE CURSOR.
** Initialization mode (first call by SAPI) or data transfer mode
** (following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
** Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZBOBJ_COMMISSION'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
** this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
* Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
STATICS: st_itab TYPE ZDGB_COMMISION_REPORT OCCURS 0 WITH HEADER LINE.
IF S_COUNTER_DATAPAKID = 0.
ORIGINAL - DIRECT CUSTOMER**********************************************************
Select
VBPA~KUNNR
VBRK~VBTYP
INTO CORRESPONDING FIELDS OF TABLE itab1
FROM
VBRK
INNER JOIN VBRP ON VBRK~VBELN = VBRP~VBELN
INNER JOIN MARA ON VBRP~MATNR = MARA~MATNR
INNER JOIN ZCUWE ON ZCUWE~BOT_MAN = MARA~ZZBOTTMANU
INNER JOIN VBPA ON VBPA~VBELN = VBRP~AUBEL
WHERE VBPA~PARVW in s_parvw.
SORT ITAB1 BY KUNNR.
LOOP AT itab2.
st_itab-BUKRS = itab2-BUKRS.
ENDLOOP.
endif.
INSERT LINES OF st_itab TO S_S_IF-MAXSIZE INTO TABLE e_t_data.
DELETE st_itab TO S_S_IF-MAXSIZE.
IF lines( st_itab ) IS INITIAL.
counter = counter + 1.
if counter = 2.
RAISE NO_MORE_DATA.
endif.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF.
ENDFUNCTION.I'm not sure, but I think there's something wrong with your select instruction
Select
VBPA~KUNNR
VBRK~VBTYP
INTO CORRESPONDING FIELDS OF TABLE itab1
FROM
VBRK
INNER JOIN VBRP ON VBRKVBELN = VBRPVBELN
INNER JOIN MARA ON VBRPMATNR = MARAMATNR
INNER JOIN ZCUWE ON ZCUWEBOT_MAN = MARAZZBOTTMANU
INNER JOIN VBPA ON VBPAVBELN = VBRPAUBEL
WHERE VBPA~PARVW in s_parvw.
You're making a join within vbrk vbrp mara zcuwe and vbpa using a non-key field such vbpa-parvw. Are you sure we're talking about an over-size problem?
You should separate INNER JOIN, using FOR ALL ENTRIES instruction, with range datas. -
Data source Enhancement with Function Module
Hi all!
I have a requirement like I have to enhance my Generic Data source.
Let me make it clear!
I have 10 field in R/3 which I am able to get into extract structure using Generic Data Source on the corresponding Table.
I have another field on my extract structure, say ZEXMFLD1 which is updated by a function module ZZ_FUNC_MODULE_SAMPLE.
I came to know that Data source Enhancement can be done, but don't know how.
Request your guidance in this. Can u please let me know how I can achieve this?
Thanks,
SriHi Sri,
You can enhance generic datasources also.
For that you have to use below function modules based on your datasource type.
EXIT_SAPLRSAP_001 - Transactiona data
EXIT_SAPLRSAP_002 - Master
EXIT_SAPLRSAP_003 - text
EXIT_SAPLRSAP_004 - Hier
First check in CMOD(TCODE) whether component RSAP0001 is assigned to any project. If it is not assigned to any project(fresh system), assign it to a project by creating it.
Ex. ZBW. If it is already assigned, go SE37.
For transaction data go to function module EXIT_SAPLRSAP_001(Trans data) and start your logic.
CASE i_datasource.
WHEN 'your data source name'.
call you Function module - CALL 'ZZ_FUNC_MODULE_SAMPLE'.
pass the imported value from above FM to c_t_data.
close case with ENDCASE.
Let me know if you need more info.
- Kalyan. -
Passing the structure to rfc function module
hi,
iam having a rfc function module which is importing structure.
i have to pass only one field value to that structure.
how can i pass that field value to that structure.
it is very urgent.
thanks in advanceHi..
You have to Declare the ACTUAL PARAMETER (workarea) with the Same Structure as that of the FORMAL PARAMETER.
but you can fill only the FIELD that you want pass in the workarea and pass it to the RFC.
<b>Reward if helpful.</b> -
Error in generic data source by using Function Module
Hi Guru's,
I'm wokring generic extraction with Function module.When i'm saving my data sources iam getting errors stating that
UNITS FIELD "WAERS" FOR FIELD "WKGBTR" OF DATA SOURCE XXX
UNITS FIELD "OWAER" FOR FIELD "WOGBTR" OF DATA SOURCE XXX
Thanks in advance..........
Regards,
Vijay
Edited by: vijay m on Feb 1, 2008 5:03 PMKhaja,
Units field WAERS for field WKGBTR of DataSource xxx
is hidden
Units field OWAER for field WOGBTR of DataSource ZBWVIEW is hidden
This is the msg which i got........ -
Interrogating field data in a called Function Module
Good day to all;
I'd like to call a function module within my program and interrogate one of its fields once it is complete. The field itself is not returned through the function module's interface, so in stead of trying to rewrite the thing, I'm wondering if I can just request it?
I've ran a search on this and noted that someone said it may be possible to assign a field symbol to a program's variable, but that in order to actually gain access your program must be on the same calling stack.Hi,
i think you mean the "dirty assign"
Re: How to access global variable declaraed in the separate program?
A.
Message was edited by: Andreas Mann -
Date conversion logic using function modules
Hi there,
I have been researching in the forum how data conversion is done in ABAP and I found out about the function modules
CONVERSION_EXIT_LDATE_OUTPUT
and
MONTH_NAMES_GET
It seems that the first function module can convert the date format 06/08/2011 to MONTH DD,YYYY and the second function can easily translate the month names once language SPRAS has been specified.
Problem is I am not sure how I can convert my VBRK-FKDAT with format MM/DD/YYYY into the format DD MONTH YYYY format with the MONTH still dependent on the specified language.
I tried to look at how to MONTH_NAMES_GET FM works and made this code:
DATA: d_return like sy-subrc,
itab_T247 like T247 occurs 0 with header line,
gs_spras type spras.
gs_spras = 'RU'.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = gs_spras
IMPORTING
RETURN_CODE = d_return
TABLES
MONTH_NAMES = itab_T247
EXCEPTIONS
MONTH_NAMES_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Loop at itab_t247.
Write:/ itab_t247-LTX.
endloop.
The code just lists the months in Russian (which is the language I need). I am just new to ABAP so I am an avid reader of the forum. I hope someone can help.
Thanks,
dgracheeHi Dgrachee ;
You can change it as follows.
Best Regards.
gs_spras = sy-langu. "'RU'.
CALL FUNCTION 'MONTH_NAMES_GET'
Maybe you are looking for
-
Problem Oracle 10g database Installation on Windows 2003 Server
Hi All, I am trying to face some problem to install oracle 10g database on windows 2003 server with service pack 2. Once I start to installation it give me an error "Error in writing to directory 'c:\documents and settings\administrator\local setting
-
Ios 8.0.2 way too slow on 16GB 4S
I updated from ios 7 two days ago and my 16GB 4S is WAY too slow. It is really noticeable in Mail and Safari, the two programs I use the most. I am really mad and discouraged at the lack of warning and the rather large (negative) impact it has made o
-
Safari won't load after software update (iTunes/Java)
Hello Gang: My wife accepted some automatic updates last night on her G4 iBook and we have problems. Now running down the Dashboard - Safari, iTunes, mail, system preferences, and iChat will not lauch nor can she empty the trash can. Can someone plea
-
Parallel valuation deactiviation problem
I define in spro for parallel valuation posting rule and document type ZX , after that I run askbn, and post some document. now I find I can't deactiviate parallel val. in asset accounting, i have multiple depreciation area. error below when I try t
-
Quicklook Preview for fonts just stopped working
For the life of me, I can't figure out why hitting spacebar no longer previews fonts/typefaces. It worked as of last Friday (today being Monday). I have restarted many times, repaired permissions, used FontNuke to clear caches, and have also cleared/