Hierachy format in Flat file
Dear All,
We are in the process of creating the flat file interfaces for hierarchies to load into BW. We have few hierarchies for customer, product and few hierarchies for custom time dimensions. I would like to know the format in which we can request the master data management team to give hierarchy data in that format. Can any body guide in creating the format for flat file hierarchy to load. Meanwhile can any body tell me whether any restrictions are there in BI7 for hierarchy load from flat file. I heard as part of BI7 hierarchy load from flat file is not yet introduced, is it true.
Regards
Vijay
Hi Chandra,
Did you check this blog? Its a step by step example
/people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
hope this can be useful too.
http://help.sap.com/saphelp_nw04/helpdata/en/fa/e92637c2cbf357e10000009b38f936/frameset.htm
Regards,
R.Ravi
Similar Messages
-
Date format in flat file is MM/DD/YYYY
I want to to change date format in flat file from MM/DD/YYYY to in info cube YYYYMMDD.
What is the step by step procedure to do this.Hi,
The date format should be YYYYMMDD in flat file.
IF the date format is not the above mentioned way, then you can change setting.
Going to System in Menu
System->User Profile->Own data.
Under Owndata you can change the date format to your requirement.
Check the below link also for detain info of coding:
Mandatory for Date field
regards
shoba -
Hi gurus,
please tellme the Hierarchy format in Flat file.
ThanQ.
Regards,
Ramesh.Hi
1.Defining the source system from which you want to load data:
Create For a flat file, choose: File System, Manual Metadata; Data via File Interface.
2.Defining the InfoSource for which you want to load data:
Create Application Component.
Create InfoSource , Direct Update
Choose an InfoObject from the proposal list, and specify a name and a description.
3.Assigning the source system to the InfoSource
Assign Source System. You are taken automatically to the transfer structure maintenance.
The system automatically generates DataSources for the three different data types to which you can load data.
Attributes, Texts,Hierarchies (if the InfoObject has access to hierarchies)
The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
4. Maintaining the transfer structure / transfer rules
Choose the DataSource to be able to upload hierarchies.
Idoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject, for which hierarchies are loaded. With this transfer method, during loading, the structure is converted to the structure of the PSA, which affects performance.
PSA transfer method: The transfer methods and the communication structure are also generated here.
5. Maintaining the hierarchy:
Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy.
PSA Transfer Method: You have the option here to set the Remove Leaf Value and Node InfoObjects indicator. As a result, characteristic values are not transferred into the hierarchy fields NODENAME, LEAFFROM and LEAFTO as is normally the case, but in their own transfer structure fields. This option allows you to load characteristic values having a length greater than 32 characters.
Characteristic values with a length > 32 can be loaded into the PSA, but they cannot be updated in characteristics that have a length >32.
The node names for pure text nodes remain restricted to 32 characters in the hierarchy (0HIER_NODE characteristic).
The system automatically generates a table with the following hierarchy format (for sorted hierarchies without removed leaf values and node InfoObjects):
The system transfers the settings for the intervals and for time-dependency from the InfoObject maintenance. Depending on which settings you have defined in the InfoObject maintenance, further table fields can be generated from the system.
The valid from and valid to field is filled if you select Total Hierarchy Time-dependent in the InfoObject maintenance. The time-dependent indicator is activated if you select the Hierarchy Nodes Time-dependent option in the InfoObject maintenance.
6. Save your entries.
Depending on which settings you defined in the InfoObject maintenance, additional fields can be generated from the system. Also note the detailed description for Structure of a Flat Hierarchy File for Loading via an IDoc and for Structure of a Flat Hierarchy File for Loading via a PSA.
Further Steps:
Maintaining InfoPackages
Result
You have uploaded the hierarchy data for the corresponding characteristic. -
Time characterstis format in flat file
hi all,
can any one plz tell me the how we can give the format for time characteristics in flat file..
thanks & RegardsFollow this,
For Calendar year/month - 200612
For Fiscal year/Period - 2006012
This would be the format we would specify in flat files.Hope this helps. -
Hi Experts,
I need to load date from flatfile. In flatfile the date format is hh:mm:ss.
I have an infoobject with type TIMS which can store only 6 CHAR length.
How is it possible to read 8 characters length in file with this info object ??
Two solutions i have is to ask for a file in hhmmss format or
the second one is to read the date with a new infoobject and write a routine to convert date to the required format in the transforamtion.
Is there any better way to handle this situation with out asking for a change in file ??Hello Narasimha,
You can perform a conversion from 8 characters to 6 characters in the transfer rules of your flat file datasource.
In the transfer rule of the infoobject (with type TIMS), do the following:
1) Create an ABAP rule code
2) Select the 8 char field in the list of source fields
3) write the following ABAP code. This converts the data from the 8 char field to 6 chars:
concatenate trans_structure-<your 8 char field here>(2) trans_structure-<your 8 char field here>+3(2) trans_structure-<your 8 char field here>+6(2) into RESULT.
Hope this helps. -
Date format in flat file of bdc
Hi Folks,
In BDC I have a flat file which has to be uploaded from a flat file and 4 users are using each of one has their date format.
so inorder to get their required date format what i need to do .Hi,
use the below logic in your code.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-031.
PARAMETERS: date1 RADIOBUTTON GROUP rad1 DEFAULT 'X', "SAP date format YYYYDDMM
date2 RADIOBUTTON GROUP rad1, "Date format like aprial31, 2006
date3 RADIOBUTTON GROUP rad1, "Date format like 31 apr,2006
date4 RADIOBUTTON GROUP rad1, "Date format like DD/MM/YYYY
date5 RADIOBUTTON GROUP rad1. "Date format like DD.MM.YYYY
SELECTION-SCREEN END OF BLOCK b2
FORM getmonth .
SELECT mnr
ktx
ltx
INTO TABLE T_month
FROM t247
WHERE spras = 'EN'.
IF sy-subrc NE '0'.
MESSAGE I "Message - Not able to get month values from the table T247
ENDIF.
ENDFORM.
DATA : temp_date(16) TYPE c,
temp1_date(60) TYPE c,
year(4) TYPE c,
daymonth(11) TYPE c,
daymonth1(11) TYPE c,
month(9) TYPE c,
day(2) TYPE c,
mon LIKE t247-ktx,
len TYPE i .
MOVE date TO temp1_date .
CONDENSE temp1_date NO-GAPS.
MOVE temp1_date TO temp_date .
IF date2 EQ 'X'. "The date format is like Aprial 31, 2007
CONDENSE temp_date NO-GAPS.
SPLIT date AT ',' INTO daymonth year.
IF STRLEN( year ) NE '4'.
error = 'X'.
WRITE : 'Invalid date format.'.
ELSE.
daymonth1 = daymonth.
CONDENSE daymonth1 NO-GAPS.
_len = STRLEN( _daymonth1 ).
l_len = 13 - len.
SHIFT daymonth1 RIGHT BY len PLACES.
CONDENSE daymonth1 NO-GAPS.
month = daymonth1.
CONDENSE month NO-GAPS.
SORT t_month BY monthltx.
READ TABLE t_month WITH KEY monthltx = month.
IF sy-subrc <> 0.
error = 'X'.
WRITE : 'Invalid date format.' .
ELSE.
len = STRLEN( month ).
CONDENSE daymonth NO-GAPS.
SHIFT daymonth LEFT BY len PLACES.
day = daymonth.
CONDENSE day NO-GAPS.
CONCATENATE year t_month-monthnumber day INTO o_date.
ENDIF.
ENDIF.
ELSEIF p_date3 EQ 'X'. "The date format is like 31 apr, 2007
CONDENSE temp_date NO-GAPS.
SPLIT i_date AT ',' INTO daymonth year.
IF STRLEN( year ) NE '4'.
error = 'X'.
WRITE : 'Invalid date format.'.
ELSE.
daymonth1 = daymonth.
CONDENSE daymonth1 NO-GAPS.
SHIFT daymonth1 LEFT BY 2 PLACES.
CONDENSE daymonth1 NO-GAPS.
month = daymonth1.
CONDENSE month NO-GAPS.
TRANSLATE month TO UPPER CASE.
SORT t_month BY monthstx.
MOVE month to mon.
READ TABLE t_month WITH KEY monthstx = mon.
IF sy-subrc <> 0.
error = 'X'.
WRITE : 'Invalid date format.' .
ELSE.
CONDENSE daymonth NO-GAPS.
day = daymonth+0(2).
CONDENSE day NO-GAPS.
CONCATENATE year t_month-monthnumber day INTO o_date.
ENDIF.
ENDIF.
ELSEIF p_date4 EQ 'X' OR p_date5 EQ 'X'. "Date format is like DD.MM.YYYY or DD/MM/YYYY
CONDENSE temp_date NO-GAPS.
IF STRLEN( temp_date ) EQ 10.
o_date0(4) = temp_date6(4).
o_date4(2) = temp_date3(2).
o_date6(2) = temp_date0(2).
ELSE.
error = 'X'.
WRITE : 'Invalid date format.' .
ENDIF.
ENDIF.
IF STRLEN( o_date ) NE '8'.
error = 'X'.
WRITE : 'Invalid date format.'.
ENDIf.
ENDFORM.
regards -
Format of flat file!!!
hello friends!!!
We are uploading opportunities in our system from a flat file. I am using LSMW with CRMXIF_ORDER_save for that. All has been the test data is working fine.
But the problem i am facing is in which format the file should be for?? in regards to item and partner function?? one opportunity can have several products and many partner functions.... does it should have a seperate field name for each item and each partner function..???
Please help its a bit urgent and also if you have a sample file please send to me on [email protected]
i hope iwas able to define my requirement clearly;
Many many thanks!!
PankajThis is now going into a general discussion please input your views.
In my opinion the flat file will have all the fields sequentially including all the items. but the problem is if the company has 50 or more products to offer then it will be a mess in the flat file having 50 items in a row and then only have value for the one product we are offering to a particular opportunity.
My question can´t we somehow break flat files?? or have some solution for this??
many thanks
Pankaj -
Date format in flat file recon
Hi,
I am trying to do Flat file reconciliation but i am getting some error related to date format. I have tried format like 20 march 2009, 02-02-2010,20 Mar 2009,2010-01-01,2010/01/01
can any one please suggest me which format i need to use.
ThanksHi sunny,
I get the same error during GTC Flat file recon. "java.text.ParseException: Unparseable date: "2009/01/25"
my xl.defaultDateformat=yyyy/MM/dd hh:mm:ss z and source Date Format is given as yyyy/MM/dd(2009/01/25) and the date format in my flatfile is given as yyyy/MM/dd. But i still get this error.
I also tried with the following dates in flatfile
2009/Mar/25
2009/01/25
2009/March/25
Did I miss anything here!
Thanks -
How to prepare the Format of Flat file(Excel or Text file) for sales order
Hi All,
My requirement is to prepare the Flat File formats(Excel or Text file) for sales order Conversion using BAPI by COB.
Needed Sample Excel or Text flat file .
Thanks for all.
Regards,
Chowdary
Moderator message : Search for available information. Thread locked.
Your similiar question [Flat files formats|Flat files formats] has been already locked for similiar reason. Read forum rules before posting.
Edited by: Vinod Kumar on Jul 8, 2011 9:36 AMHi,
You can use something like this:
switch(cell.getCellType()) {
case Cell.CELL_TYPE_STRING:
System.out.println(cell.getRichStringCellValue().getString());
break;
case Cell.CELL_TYPE_NUMERIC:
if(DateUtil.isCellDateFormatted(cell)) {
System.out.println(cell.getDateCellValue());
else {
System.out.println(cell.getNumericCellValue());
break;
case Cell.CELL_TYPE_BOOLEAN:
System.out.println(cell.getBooleanCellValue());
break;
case Cell.CELL_TYPE_FORMULA:
System.out.println(cell.getCellFormula());
break;
default:
System.out.println();
Hope it helps,
Daniel -
Font formatting for Flat file generated in PI
Hi,
We have a File receiver scenario in PI wherein we are generating a Flat file. While creating the file, the font needs to be of specific font type and size
eg:
Pyramid u2013 Lucida Console (Size 10)
Aspheria u2013 I5_10N (Size 10)
Is there any way this can be configured or implemented in PI?Hi ,
This requirement we can achieve using XSLT Mapping,we can define the font size in mapping program it self,select output method in xslt program as TEXT,no need of any file content conversion in Receiver Communication channel.
refer this link how to uses the methods for font sizes.
http://www.xml.com/pub/a/2001/01/24/xsl-fo/
Regards,
Raj -
Format of flat file to load to ODS
Good morning
Please give me guidance in the following?
1) I will received this from the user and need to develop the ODS and thereafter use the target and payout % with sales figures in reporting:
Target <80% =>80% =>90% =>100%
Payout Dealer group A 0.10% 0.20% 0.35% 0.50%
Payout Dealer group B 0.10% 0.20% 0.40% 0.60%
The above information must be loaded via a flat file to the ODS. What should the columns in the flat file look like? Do I create an InfoObject for each target and payout percentage? I do not really want to use Update rules or routines as the user wants to create the CKF's or RKF's himself, but want to keep it as easy as possile for the user to report on these figures and percentages.
Your assistance will be appreciated
Thanks
Cj FaurieHi Cj,
According to the requirements what u Hav written ,these key figures are not calculated one ,then u can make a flat fileusing comma as separator such that your file looks like:
Target %,Payout Dealer Group A %,Payout Dealer Group B %,
80,0.10,0.10
90,0.20.0.40
so on
Hope this helps,
Regards,
Baksh -
Regarding the format of Flat file?
Hi frndz,
I have a requirement wherein i should create a flat file with around 20 characters and a time characteristic as Fiscal year variant. Which should be loaded to master data table.
So can anyone give me the idea about
1) How to create the flat file,Which include Fiscal year variant as a column in the file?
2) What should be the order of the columns in the flat file?
3) What are the other things that i should keep in mind while creating the flat file?
Thanks in Advance.
Thanks
VinayHi ,
One more imp thing is that , if you are seperating the fields by , then in the infopackage , external tab , we need to maintain as seperator as " , " or if you are seperating the fields by " ;" , then then in the infopackage , external tab , we need to maintain as seperator as " ; " .And also we need to put 1 for the no of header rows to be ignored . And maintain Escape sign as ' " ' or "*" .
Hope this helps out
Thanks
PT -
To change "package" file format to "flat" files for iDisk
First, let me thank Yvan Koenig for providing a great script to convert "Word2Pages"...
There is a problem at present discussed on the MobileMe forum page, with files not uploading to iDisk using Finder. One problem is that whereas "flat" files load, "package" files do not. (There is a choice in the Pages Preferences for these options.) This limitation also applies to emailling files.
I used Yvan's "Word2Pages" batch conversion script for hundreds of files which saved me days of work. However, to load these onto my iDisk I need to convert them to "flat" files.
Please can I humbly ask him to write a similar script for converting files from "package2flat". I am not so advanced as he in computer literacy and would surely appreciate his help.
Message was edited by: putnikYvan,
Thank you finding a solution to the default setting. I wonder how many Pages 09 files have been produced as packages with umpteen subfolders for things that will never be used. No wonder my Finder kept on crashing when I tried to upload to my iDisk.
I have written a bug report to Apple via Pages so hope they will change the default setting for "Copy Audio and Movies to the Document".
I am puzzled about your Word2Pages script still producing "package" files even after making the changes to default values that you describe. Could it be that the code is calling up old default values from somewhere else. There seems to be a plist in the Application folder and another in the User library.
Is this the relevant piece of code?
on getPlistValue(valName, default)
local thePlist, u
set thePlist to (path to preferences folder as Unicode text) & "com.apple.iWork." & theApp & ".plist"
tell application "System Events"
if exists file thePlist then
tell contents of property list file thePlist
try
set u to (value of property list item valName) (* Unicode Text *)
on error (* Here if Numbers never saved with the new preferences file. *)
set u to default
end try
end tell -- to contents of…
else (*Here if there is no preferences file. *)
set u to default
end if
end tell -- to system events
return u
end getPlistValue
Well I am trying to learn Applescript but not finding it easy.
Message was edited by: putnik -
Hi All,
I have to load a flat file of the type Text (Tab Delimited) (*.TXT) in BI. How can i do that.
It is coming from an external system and hence i cannot have the format change. What should i do in
my flat file data source to be able to upload it
Thanks
Rashmi.Hi Rashmi,
There can be two formats of flat file uploading ...
one is ascii which means fixed length format .... in which there is no need of delimitation .... according to fixed length each value will go into corresponding field...
the other is the csv (comma seperate value) which the fields are seperated by a commaa...
as u are saying the input file is tab delimited u need to change the file format into any of the above types before u load into bi...
for if u are using a process chain u has to manually convert this file format and then load in the application server .
for if u are loading manaully u can edit the file to this format and load from ur work station.......
Regards
vamsi
Edited by: vamsi talluri on Feb 6, 2009 5:36 AM -
BDC for ME21N (Flat file format)
Hello,
I have to write a BDC for ME21N(stock transfer).... Someone pls give me the format of flat file... we need separate files for header and items or only one file is enough??? pls someone send me the format and code......
my email id is [email protected]
Thanks in advance...
Regards,
Maya.Hi
see this and do accordingly
REPORT zmm_bdcp_purchaseorderkb02
NO STANDARD PAGE HEADING LINE-SIZE 255.
Declaring internal tables *
*-----Declaring line structure
DATA : BEGIN OF it_dummy OCCURS 0,
dummy(255) TYPE c,
END OF it_dummy.
*-----Internal table for line items
DATA : BEGIN OF it_idata OCCURS 0,
ematn(18), "Material Number.
menge(13), "Qyantity.
netpr(11), "Net Price.
werks(4), "Plant.
ebelp(5), "Item Number.
END OF it_idata.
*-----Deep structure for header data and line items
DATA : BEGIN OF it_me21 OCCURS 0,
lifnr(10), "Vendor A/c No.
bsart(4), "A/c Type.
bedat(8), "Date of creation of PO.
ekorg(4), "Purchasing Organisation.
ekgrp(3), "Purchasing Group.
x_data LIKE TABLE OF it_idata,
END OF it_me21.
DATA : x_idata LIKE LINE OF it_idata.
DATA : v_delimit VALUE ','.
DATA : v_indx(3) TYPE n.
DATA : v_fnam(30) TYPE c.
DATA : v_count TYPE n.
DATA : v_ne TYPE i.
DATA : v_ns TYPE i.
*include bdcrecx1.
INCLUDE zmm_incl_purchaseorderkb01.
Search help for file *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
START-OF-SELECTION.
To upload the data into line structure *
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = it_dummy.
Processing the data from line structure to internal tables *
REFRESH:it_me21.
CLEAR :it_me21.
LOOP AT it_dummy.
IF it_dummy-dummy+0(01) = 'H'.
v_indx = v_indx + 1.
CLEAR it_idata.
REFRESH it_idata.
CLEAR it_me21-x_data.
REFRESH it_me21-x_data.
SHIFT it_dummy.
SPLIT it_dummy AT v_delimit INTO it_me21-lifnr
it_me21-bsart
it_me21-bedat
it_me21-ekorg
it_me21-ekgrp.
APPEND it_me21.
ELSEIF it_dummy-dummy+0(01) = 'L'.
SHIFT it_dummy.
SPLIT it_dummy AT v_delimit INTO it_idata-ematn
it_idata-menge
it_idata-netpr
it_idata-werks
it_idata-ebelp.
APPEND it_idata TO it_me21-x_data.
MODIFY it_me21 INDEX v_indx.
ENDIF.
ENDLOOP.
To open the group *
PERFORM open_group.
To populate the bdcdata table for header data *
LOOP AT it_me21.
v_count = v_count + 1.
REFRESH it_bdcdata.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0100',
' ' 'BDC_CURSOR' 'EKKO-LIFNR',
' ' 'BDC_OKCODE' '/00',
' ' 'EKKO-LIFNR' it_me21-lifnr,
' ' 'RM06E-BSART' it_me21-bsart,
' ' 'RM06E-BEDAT' it_me21-bedat,
' ' 'EKKO-EKORG' it_me21-ekorg,
' ' 'EKKO-EKGRP' it_me21-ekgrp,
' ' 'RM06E-LPEIN' 'T'.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '/00'.
MOVE 1 TO v_indx.
*-----To populate the bdcdata table for line item data
LOOP AT it_me21-x_data INTO x_idata.
CONCATENATE 'EKPO-EMATN(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-ematn.
CONCATENATE 'EKPO-MENGE(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-menge.
CONCATENATE 'EKPO-NETPR(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-netpr.
CONCATENATE 'EKPO-WERKS(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-werks.
v_indx = v_indx + 1.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '/00'.
ENDLOOP.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '=BU'.
PERFORM bdc_transaction USING 'ME21'.
ENDLOOP.
PERFORM close_group.
End of selection event *
END-OF-SELECTION.
IF session NE 'X'.
*-----To display the successful records
WRITE :/10 text-001. "Sucess records
WRITE :/10 SY-ULINE(20).
SKIP.
IF it_sucess IS INITIAL.
WRITE :/ text-002.
ELSE.
WRITE :/ text-008, "Total number of Succesful records
35 v_ns.
SKIP.
WRITE:/ text-003, "Vendor Number
17 text-004, "Record number
30 text-005. "Message
ENDIF.
LOOP AT it_sucess.
WRITE:/4 it_sucess-lifnr,
17 it_sucess-tabix CENTERED,
30 it_sucess-sucess_rec.
ENDLOOP.
SKIP.
*-----To display the erroneous records
WRITE:/10 text-006. "Error Records
WRITE:/10 SY-ULINE(17).
SKIP.
IF it_error IS INITIAL.
WRITE:/ text-007. "No error records
ELSE.
WRITE:/ text-009, "Total number of erroneous records
35 v_ne.
SKIP.
WRITE:/ text-003, "Vendor Number
17 text-004, "Record number
30 text-005. "Message
ENDIF.
LOOP AT it_error.
WRITE:/4 it_error-lifnr,
17 it_error-tabix CENTERED,
30 it_error-error_rec.
ENDLOOP.
REFRESH it_sucess.
REFRESH it_error.
ENDIF.
CODE IN INCLUDE.
Include ZMM_INCL_PURCHASEORDERKB01
DATA: it_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA: it_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: E_GROUP_OPENED.
*-----Internal table to store sucess records
DATA:BEGIN OF it_sucess OCCURS 0,
msgtyp(1) TYPE c,
lifnr LIKE ekko-lifnr,
tabix LIKE sy-tabix,
sucess_rec(125),
END OF it_sucess.
DATA: g_mess(125) type c.
*-----Internal table to store error records
DATA:BEGIN OF it_error OCCURS 0,
msgtyp(1) TYPE c,
lifnr LIKE ekko-lifnr,
tabix LIKE sy-tabix,
error_rec(125),
END OF it_error.
Selection screen
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS session RADIOBUTTON GROUP ctu. "create session
SELECTION-SCREEN COMMENT 3(20) text-s07 FOR FIELD session.
SELECTION-SCREEN POSITION 45.
PARAMETERS ctu RADIOBUTTON GROUP ctu. "call transaction
SELECTION-SCREEN COMMENT 48(20) text-s08 FOR FIELD ctu.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) text-s01 FOR FIELD group.
SELECTION-SCREEN POSITION 25.
PARAMETERS group(12). "group name of session
SELECTION-SCREEN COMMENT 48(20) text-s05 FOR FIELD ctumode.
SELECTION-SCREEN POSITION 70.
PARAMETERS ctumode LIKE ctu_params-dismode DEFAULT 'N'.
"A: show all dynpros
"E: show dynpro on error only
"N: do not display dynpro
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 48(20) text-s06 FOR FIELD cupdate.
SELECTION-SCREEN POSITION 70.
PARAMETERS cupdate LIKE ctu_params-updmode DEFAULT 'L'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) text-s03 FOR FIELD keep.
SELECTION-SCREEN POSITION 25.
PARAMETERS: keep AS CHECKBOX. "' ' = delete session if finished
"'X' = keep session if finished
SELECTION-SCREEN COMMENT 48(20) text-s09 FOR FIELD e_group.
SELECTION-SCREEN POSITION 70.
PARAMETERS e_group(12). "group name of error-session
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 51(17) text-s03 FOR FIELD e_keep.
SELECTION-SCREEN POSITION 70.
PARAMETERS: e_keep AS CHECKBOX. "' ' = delete session if finished
"'X' = keep session if finished
SELECTION-SCREEN END OF LINE.
PARAMETERS:p_file LIKE rlgrap-filename.
at selection screen *
AT SELECTION-SCREEN.
group and user must be filled for create session
IF SESSION = 'X' AND
GROUP = SPACE. "OR USER = SPACE.
MESSAGE E613(MS).
ENDIF.
create batchinput session *
FORM OPEN_GROUP.
IF SESSION = 'X'.
SKIP.
WRITE: /(20) 'Create group'(I01), GROUP.
SKIP.
*----open batchinput group
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = GROUP
USER = sy-uname.
WRITE:/(30) 'BDC_OPEN_GROUP'(I02),
(12) 'returncode:'(I05),
SY-SUBRC.
ENDIF.
ENDFORM. "OPEN_GROUP
end batchinput session *
FORM CLOSE_GROUP.
IF SESSION = 'X'.
*------close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
(12) 'returncode:'(I05),
SY-SUBRC.
ELSE.
IF E_GROUP_OPENED = 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /.
WRITE: /(30) 'Fehlermappe wurde erzeugt'(I06).
ENDIF.
ENDIF.
ENDFORM. "CLOSE_GROUP
Start new transaction according to parameters *
FORM BDC_TRANSACTION USING TCODE TYPE ANY.
DATA: L_SUBRC LIKE SY-SUBRC.
*------batch input session
IF SESSION = 'X'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
TABLES
DYNPROTAB = it_BDCDATA.
WRITE: / 'BDC_INSERT'(I03),
TCODE,
'returncode:'(I05),
SY-SUBRC,
'RECORD:',
SY-INDEX.
ELSE.
REFRESH it_MESSTAB.
CALL TRANSACTION TCODE USING it_BDCDATA
MODE CTUMODE
UPDATE CUPDATE
MESSAGES INTO it_MESSTAB.
L_SUBRC = SY-SUBRC.
WRITE: / 'CALL_TRANSACTION',
TCODE,
'returncode:'(I05),
L_SUBRC,
'RECORD:',
SY-INDEX.
ENDIF.
Message handling for Call Transaction *
perform subr_mess_hand using g_mess.
*-----Erzeugen fehlermappe
IF L_SUBRC <> 0 AND E_GROUP <> SPACE.
IF E_GROUP_OPENED = ' '.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = E_GROUP
USER = sy-uname
KEEP = E_KEEP.
E_GROUP_OPENED = 'X'.
ENDIF.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
TABLES
DYNPROTAB = it_BDCDATA.
ENDIF.
REFRESH it_BDCDATA.
ENDFORM. "BDC_TRANSACTION
Form subr_bdc_table *
text
-->P_0220 text *
-->P_0221 text *
-->P_0222 text *
FORM subr_bdc_table USING VALUE(P_0220) TYPE ANY
VALUE(P_0221) TYPE ANY
VALUE(P_0222) TYPE ANY.
CLEAR it_bdcdata.
IF P_0220 = ' '.
CLEAR it_bdcdata.
it_bdcdata-fnam = P_0221.
it_bdcdata-fval = P_0222.
APPEND it_bdcdata.
ELSE.
it_bdcdata-dynbegin = P_0220.
it_bdcdata-program = P_0221.
it_bdcdata-dynpro = P_0222.
APPEND it_bdcdata.
ENDIF.
ENDFORM. " subr_bdc_table
Form subr_mess_hand *
text *
-->P_G_MESS text *
FORM subr_mess_hand USING P_G_MESS TYPE ANY.
LOOP AT IT_MESSTAB.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = it_messtab-msgid
LANG = it_messtab-msgspra
NO = it_messtab-msgnr
v1 = it_messtab-msgv1
v2 = it_messtab-msgv2
IMPORTING
MSG = P_G_MESS
EXCEPTIONS
OTHERS = 0.
CASE it_messtab-msgtyp.
when 'E'.
it_error-error_rec = P_G_MESS.
it_error-lifnr = it_me21-lifnr.
it_error-tabix = v_count.
APPEND IT_ERROR.
when 'S'.
it_sucess-sucess_rec = P_G_MESS.
it_sucess-lifnr = it_me21-lifnr.
it_sucess-tabix = v_count.
APPEND IT_SUCESS.
endcase.
ENDLOOP.
Describe table it_sucess lines v_ns.
Describe table it_error lines v_ne.
ENDFORM. " subr_mess_hand
Regards
Anji
Maybe you are looking for
-
Can no longer open my itunes after installing ipod software...help?!
I received an ipod nano for Christmas. After installing the cd into my computer to download the software, nothing seemed to happen. There is no icon on my desk top. Not only that, I can no longer open up my itunes. There is no error message either. W
-
Ordering non catalog products in B2B
Hello, We would like to allow a B2B user to search and order products not in our catalog, but are valid products in R/3. Our assumption was we could set the parameter enable.nonCatalogProducts in the XCM to True, and this would work. Unfortunately
-
Problem in Reporting having 2 records in Cube of same attribute
Hi All, Here are a few thoughts about the problem 1. We are doing a full load to the DSO 2. Then are loading a delta to the cube If, an employee's attribute changes today, (e.g. for OrgUnit A to OrgUnit B), then that e
-
HT5312 i have a locked apple id as i don't know my security answers, can you help me?
i have a locked apple id as i don't know my security answers, can you help me?
-
HT4059 audio books in iTunes how and where do they sync to iPhone
When sync iPhone with iTunes 11 do not see how to sync audio books