How to fill the table manually
Hi guys,
may I fill z table manually and how?
thanks
Nihad
Hi,
Please create a Table maintainance generator for the Table created, and then either use SM30 or SE16 or SE16N to fill the entries to that table.
Please dont use SE11 to create entries to the database table created, because, If you are creating entries using SE11, then these entries will not be available in Quality system when you have transported your table from Development system to quality system.
But those entries created using SM30 or SE16 or SE16N, will ask for a TR name and you can save the entries under that TR.
Best Regards,
Suresh
Similar Messages
-
In sm30, when save, how to fill the table with the system data in the table
Hi all, in SM30, we have user name and time fields, when we create record, after we click the SAVE button, it will automatically fill the fields with the system data, how can we realize it?
Hi ,
Do like this.
1. Go to SE11 -> give your table name and press on change button .
2.Go to Menu->Utilities-> Table Maintainance Generator , then it will take you another screen .
3.Assign Functin group if already have one , other wise create function group and assign
4.Go to Menu->Environment->Modification->Events , again it will take you to another screen
5.Click on new entries
->Now press F4 in T column . Select<u> "01" - Before saving the data in the database</u> and in form routinue give any name of the routinue like "SAVE_USER_DATA" and press enter then u can see an editor symbol in next column click on that it will take you ABAP editor there type this code .
ztable-username = sy-uname.
ztable-createtime = sy-uziet.
check and activate the code .
With this your job will be complete . Now while entering data just leave columns blank , they will insert corresponding username and time
Don't forget award points if it helps you.
Regards,
Raghav -
How to fill the table UD_SAPHR with data from SAP HR Connector
Hi, I`ve searched all the forrum but didn`t find how to map fields from connector form to the any field in OIM. I tryied with entity adapters but failed to reach any result. The problem is that I even cant put incoming data with connector to the table of the connector form (UD_SAPHR).
I will be grateful for any help. Below is the cut of the log. In few words - how to map, for example, field "Department=40000260" to the field in the USR table or UD_SAPHR table (or any other - to have this information in OIM).
OIM-9101Upd5, OS-Oracle Enterprise Linux4x64,SAP COnnector-SAP-ER90460, Database-Oracle 10gx64, Appication server-SOA(Oracle Application server)
INFO,01 Jul 2009 14:08:11,504,[XL_INTG.SAPHRMS],getDetailsForRecon(): *****************************
INFO,01 Jul 2009 14:08:11,505,[XL_INTG.SAPHRMS],getDetailsForRecon(): 00000017
INFO,01 Jul 2009 14:08:11,505,[XL_INTG.SAPHRMS],reconcileEmp(): SAPUserRecon for SAP : SAP HRMS IT Resource:EmployeeId=00000017
DEBUG,01 Jul 2009 14:08:11,505,[XL_INTG.SAPHRMS],SAPUserRecon:returnDate(): Employee Status***3
DEBUG,01 Jul 2009 14:08:11,505,[XL_INTG.SAPHRMS],EmpStatus***3
INFO,01 Jul 2009 14:08:11,505,[XL_INTG.SAPHRMS],getUserId(): Recon key is 00000017
INFO,01 Jul 2009 14:08:11,505,[XL_INTG.SAPHRMS],getUserId(): Hash Key is USR_UDF_PERSONNEL_NUMBER
INFO,01 Jul 2009 14:08:11,505,[XL_INTG.SAPHRMS],getUserId(): Get UserId of user with reconKey: 00000017
INFO,01 Jul 2009 14:08:11,506,[XL_INTG.SAPHRMS],getUserId():hmFilter: {USR_UDF_PERSONNEL_NUMBER=00000017}
INFO,01 Jul 2009 14:08:11,540,[XL_INTG.SAPHRMS],Result set rs contains : Thor.API.tcMetaDataSet@790a37
INFO,01 Jul 2009 14:08:11,540,[XL_INTG.SAPHRMS],getUserId(): Xellerate RS Count*** 0
DEBUG,01 Jul 2009 14:08:11,541,[XL_INTG.SAPHRMS],getUserId(): hmReturn ***{Create=0, UserLinked=0, userId=, UserKey=, XelUser=, Exist=0, User=}
INFO,01 Jul 2009 14:08:11,541,[XL_INTG.SAPHRMS],getUserId(): Recon key is 00000017
INFO,01 Jul 2009 14:08:11,541,[XL_INTG.SAPHRMS],getUserId(): Hash Key is USR_UDF_PERSONNEL_NUMBER
INFO,01 Jul 2009 14:08:11,541,[XL_INTG.SAPHRMS],getUserId(): Get UserId of user with reconKey: 00000017
INFO,01 Jul 2009 14:08:11,541,[XL_INTG.SAPHRMS],getUserId():hmFilter: {USR_UDF_PERSONNEL_NUMBER=00000017}
INFO,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],Result set rs contains : Thor.API.tcMetaDataSet@282f10
INFO,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],getUserId(): Xellerate RS Count*** 0
DEBUG,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],getUserId(): hmReturn ***{Create=0, UserLinked=0, userId=, UserKey=, XelUser=, Exist=0, User=}
DEBUG,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],sEmployeeUserID***
DEBUG,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],UserKey***
DEBUG,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],EmpStatus fetch from target System is 3
DEBUG,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],EmpStatus Mentioned in Task scheduler is 3
INFO,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],reconcileEmp():sUser get from Resource Object Table ***
INFO,01 Jul 2009 14:08:11,570,[XL_INTG.SAPHRMS],reconcileEmp():sXelUser get from Xellerate Table***
el Number=00000017, LinkedUserID=, Xellerate Type=End-User Administrator, First Name=п⌠п╣пҐпҐп╟пЄп╦п╧, Last Name=п■п╟п╡я▀пЄп╬п╡, Role=Consultant, Middle Name=FromHRMS=1}╣п╡п╦я┤, Userr
INFO,01 Jul 2009 14:08:11,571,[XL_INTG.SAPHRMS],Reconciliation of the user entered
DEBUG,01 Jul 2009 14:08:11,571,[XL_INTG.SAPHRMS],before create HR user reconciliation event***{PostalCode=, EndDate=9999/12/31 12:00:00 MSK, EmailAddress=, SSN=, State=, District=, TelephoneNumber=, Manager=, StartDate=1888/12/01 12:00:00 MSK, City=, EmplUserId=, UserLinked=0, UserLocked=0, FirstName=п⌠п╣пҐпҐп╟пЄп╦onnel Number=00000017, EmployeeId=00000017, Country=RU, Title=Mr, Department=40000260, MiddleName=п░пҐпЄя─п╣п╣п╡п╦я┤, LastName=п■п╟п╡я▀пЄп╬п╡}
INFO,01 Jul 2009 14:08:11,711,[XL_INTG.SAPHRMS],disableEnableXelUser(): Get UserKey of user with reconKey: 00000017 for SAP SAP HRMS IT Resource
DEBUG,01 Jul 2009 14:08:11,742,[XL_INTG.SAPHRMS],disableEnableXelUser(): Xellerate RS Count*** 0
INFO,01 Jul 2009 14:08:11,742,[XL_INTG.SAPHRMS],reconcileEmp(): User Reconciliation for Create & Modify User is completed.
INFO,01 Jul 2009 14:08:11,742,[XL_INTG.SAPHRMS],reconcileEmp() **** DONE RECONCILIATIONThat is my problem. I get only those fields, that are in the xellerate user standard form. And I need also fields "Department" and "City".
This information connector gets from SAP (as it is seen in log) but doesn`t save it anywhere inside the OIM, though such fields exists in the UD_SAPHR table (and correspondend form) but this table remains empty after reconciliation.
DEBUG,26 Jun 2009 18:01:41,746,[XL_INTG.SAPHRMS],before create XL user reconciliation event***{Email=, Organization=Xellerate Users, User ID=00000072, Personnel Number=00000072, LinkedUserID=, Xellerate Type=End-User Administrator, First Name=п°пҐп╣, Last Name=п п╬п╪п©п╣пҐя│п╦я─я┐п╧п╨п╟, Role=Consultant, Middle NamomHRMS=1}
INFO,26 Jun 2009 18:01:41,746,[XL_INTG.SAPHRMS],Reconciliation of the user entered
DEBUG,26 Jun 2009 18:01:41,746,[XL_INTG.SAPHRMS],before create HR user reconciliation event***{PostalCode=, EndDate=9999/12/31 12:00:00 MSK, EmailAddress=, SSN=, State=, District=, TelephoneNumber=, Manager=, StartDate=1970/01/01 12:00:00 MSK, City=, EmplUserId=, UserLinked=0, UserLocked=0, FirstName=п°пҐп╣, Person Number=00000072, EmployeeId=00000072, Country=RU, Title=Mr, Department=40000240, MiddleName=п·я┌п©я┐я│п╨, LastName=п п╬п╪п©п╣пҐя│п╦я─я┐п╧п╨п╟}
Edited by: user6645106 on 03.07.2009 10:12 -
How to fill the tables faglflexa and faglflext when creating a new document
Hello all,
I need to modify the field faglflexa-RMVCT when creating a new FI document , actually i'm using the transaction ABUMN,
i tried to use manu user-exit to change this table unfortunately , I have not changed this entry .
Could you please help me to find a solution for this problem?
Thank you in advance,When you are defining the elements of the datatype there are columns where you can do what you need:
<b>column type</b>: here you choose the type of data of the element
it can be a standard type or a user defined one (if you click one time only it should appear an icon in the right for input help: click there and choose the type you need)
<b>column occurence </b>: in a similar way of column type here you define the cardinality of the element (min occurence and max occurence)
setting min occurrence: 1, max occurrence 1 or unbounded --> required
mmin occurrence 0, max occurrence 0, 1 or unbounded --> optional
about the attributes there are directly the choice between required or optional.
<b> column details </b>: here you define the length of the element if it is a string or a lot of other things if the type is a different one.
I hope this will help you -
How to use the table maintenance events for validating the input entries..?
Hi,
I have created a Z table with 6 fields in which all are KEY fields. All are of CHAR type. I have created the Table Maintenance Generator for the same. While maintaining the entries in the table, even though I maintain a blank entry for a field it is saving the entry. But, I don't want that way. All the fields are mandatory in my table. One should enter all the fields. Otherwise it should not allow to save the entry. So, I think it can be done using the Table Maintenance Events. can someone tell me how to use the Table Maintenance Events. and which event to use for my reuqirement and what is the logic to be written.
Or Is there any other way to solve my problem.
Please share your inputs. Thanks in advance.
Best regards,
paddu.In the table maintenance generator, Environment --> Modifications --> Events then a screen will be appear here,we need to create the Events.In the EVENTS screen, press new Entries, there give 01(Before Saving the Data in the Database) and give a name(This will become a PERFORM), then click the Editor pushbutton, this will be there at the right side of the entry, then a popup will be appear, you can create an include program, there inside of the include program write ur code.
Here is documentation for Event 01(Before Saving the Data in the Database )
Event 01: Before Saving the Data in the Database
Use
This event occurs before new, changed or deleted entries are written to the database. Other activities can be performed, for example:
hidden entry processing
fill hidden fields
flag data to be written to hidden tables after the database change.
To have the changes saved by the central maintenance dialog routines, SY-SUBRC must be set to 0 at the end of the routine.
Realization
This event has no standard routine. The following global data is available for the realization of the user routine:
internal table TOTAL
field symbols
field symbols <ACTION> and <ACTION_TEXT>
<STATUS>-UPD_FLAG
If internal table data are to be changed before saving, t he changes should be made in both the internal table TOTAL and in the internal table EXTRACT.
FORM abc.
DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
LOOP AT TOTAL.
IF <ACTION> = desired constant.
READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
(make desired changes to the line TOTAL)
MODIFY TOTAL.
CHECK F_INDX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDX.
ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM.
Regards,
Joy. -
How to fill the values in List Box?
Hi Experts,
Can anyone explain me how to fill the values in the List Box such that the value should be from the table?
For Example : Fill the EmpID from table T1 into the ListBox?
Thanks in Advance,
Regards,
Raghuhi,
and u doing it through report means from se38 than here is code...
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
END OF itab.
DATA : ok_code LIKE sy-ucomm.
CALL SCREEN 0200.
*& Module STATUS_0200 OUTPUT
text
MODULE status_0200 OUTPUT.
SET PF-STATUS 'Z200'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE user_command_0200 INPUT.
CASE ok_code.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Module mat_val INPUT
text
MODULE mat_val INPUT.
SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE itab
WHERE matnr BETWEEN '000000000000000101' AND '000000000000000109'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
VALUE_ORG = 'S'
tables
value_tab = itab
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " mat_val INPUT
<b>And this is flow logic..</b>
PROCESS BEFORE OUTPUT.
MODULE status_0200.
PROCESS AFTER INPUT.
MODULE user_command_0200.
PROCESS ON VALUE-REQUEST.
FIELD itab-matnr MODULE mat_val. -
How to fill datasource/table from archive?
Dear Colleagues!
How can I fill a datasource with archived data?
I have created the Infostructure and the generic datasource (SD_VBRK_ARKIV). The datasource is available in BW after replication. But when I try to load it with an infopackage it finds 0 records. Am I missing a step? Is there something I need to do on the R/3 side to fill the table?
Hope you can help,
Regards SiljeHi Shabar,
I have only tested it in Test, since I do not have any rights in Prod yet (waiting..). And it extracts data in test. But I don't know if there has been done any special operation on the R/3 test side before the extractor was able to collect data. It might be that the extractor is imported into production (since I get it when replicating in BI prod) but there is some operation that need to be done to collect data. Becaus as of now I am receiving 0 records in prod.
Silje -
How to Fill Setup tables for MAP (IS- Retail)
Hello,
I am working on MAP scenario, I found the following data sources as a part of it. Can anybody please tell me how to fill the setup tables for these and what are the base tables for it??
2LIS_40_REVAL
2LIS_40_S202
2LIS_40_S207
2LIS_40_S208
Your reply is highly appreciated.
Regards,
NareshHi Naresh,
We cannot fill setup tables for each data source.
ORISBW -- This is the t-code to fill the setup tables for all the data sources which are related to application component 40.
If you want setup tables names of your data sources please check below.
2LIS_40_REVAL --- MC40RP0REVSETUP.
Comes to your second post.
2LIS_40_S202
2LIS_40_S207
2LIS_40_S208 these are LIS data sources, whic are replaced with LO data sources in SAP BI 7.0
If you are using LO data sources then no need to use LIS data sources.
Regards,
Venkatesh -
How to fill the "budget" in an initiative in SEM BSC
Good Afternoon for all!
We have a Balanced Scorecard implemented in SAP SEM BSC, using SAP BW.
Our Balanced Scorecard actually manages ratios, objectives, perspectives, strategy and scorecard.
Now, we are trying to use "iniatiatives" and we have using the SEM BSC wizard, through the web interface.
When defining the initiative everything goes ok, we define the initiative , and then we assign it to an objective.
We have also installed the infocube "0SEM_C02" which we have the understanding that it stores the information concerned to initiatives.
I have also build a SEM BPS layout and planning area for this infocube (0SEM_C02) in order to fill the infocube with information (manually entered).
But after all these, the information does not appear for the "budget" when displaying the Balanced scorecard.
When displaying an initiative it displays:
-Definition
-Duration
-Priority
-Status and score
-Milestones
-Team members
-Objectives
-Budget (<-----E M P T Y !! )
I do not understand, how to fill the "Budget" data for an initiative. Because we have fill all the information regarded to the initiative included above, but the budget is very important for us, and as i said before, we have installed the infocube 0SEM_C02, we also created a planning area for this infocube in BPS, we have created a planning layout for this infocube, and we have entered some values to this infocube.
Is there any special condition or something special to do, in order to fill the budget for an initiative in SAP SEM BSC??
How can we see in the BSC the budget for an initiative, or fill the value???
We will appreciate any help for this issue.
Thanks in advance for your valuable help.
Carlos Espana
Cementos Progreso
GuatemalaCarlos,
This is the Forum for SAP Strategy Management.
There is another Forum specifically for SEM-BSC questions.
Go to the SAP Community Network Forums > SAP Solutions > SEM-BSC
Please repost your question there for an answer.
Regards,
Bob -
How to fill the details tab in tv shows with description
Can anyone tell how to fill out the details tab metadata in the tv shows section of iPad? The tv shows purchased from the iTunes Store have the details tab beside the episodes tab filled in with helpful description about the show. Isn't there a way to do that manually for personally downloaded tv shows? It's not possible to buy every content from the iTunes Store. Please help if anyone know how to add description to tv show details.
see your duplicate thread : How to fill the details tab in the iPad tv shows with description
-
How to refresh the table control on some action
Hi All,
In a web Dynpro application, I am filling data to the Table control through Supply function. When I do some action (like save new record ) i want to refresh the table control means add the newly added record.
How to refresh the Table control.
Thanks
Hemalathahi hema........
if you are using a select query inside the supply function...
then...
you can just use node->invalidate(). method..
it just invalidates the node that is bound to the table.
so the supply function will be called again, which again uses the select query to fetch the values.. so that your table gets refreshed.
---regards,
alex b justin -
How to clear the table control content
Hi All,
I am doing BDC for cost estimate change. In this the transaction KKPB contains table control. So when ever i process with particular cost estimate, i need to fill the table control with the values. Here when i am doing the BDC for change, i need to clear all the contents of the table control then i need to fill with new entries.
So my problems is how to clear the table control entriee?? please help me in this??
Many Thanks,
Raghu.Hi this might help u.
Check the below link.
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
THis is example to upload the Bank details of the Vendor which has the TC.
REPORT zprataptable2
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0,
i1 TYPE i,
lifnr LIKE rf02k-lifnr,
bukrs LIKE rf02k-bukrs,
ekorg LIKE rf02k-ekorg,
ktokk LIKE rf02k-ktokk,
anred LIKE lfa1-anred,
name1 LIKE lfa1-name1,
sortl LIKE lfa1-sortl,
land1 LIKE lfa1-land1,
akont LIKE lfb1-akont,
fdgrv LIKE lfb1-fdgrv,
waers LIKE lfm1-waers,
END OF itab.
DATA : BEGIN OF jtab OCCURS 0,
j1 TYPE i,
banks LIKE lfbk-banks,
bankl LIKE lfbk-bankl,
bankn LIKE lfbk-bankn,
END OF jtab.
DATA : cnt(4) TYPE n.
DATA : fdt(20) TYPE c.
DATA : c TYPE i.
INCLUDE bdcrecx1.
START-OF-SELECTION.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\first1.txt'
filetype = 'DAT'
TABLES
data_tab = itab.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\second.txt'
filetype = 'DAT'
TABLES
data_tab = jtab.
LOOP AT itab.
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
itab-lifnr.
PERFORM bdc_field USING 'RF02K-BUKRS'
itab-bukrs.
PERFORM bdc_field USING 'RF02K-EKORG'
itab-ekorg.
PERFORM bdc_field USING 'RF02K-KTOKK'
itab-ktokk.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-LAND1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFA1-ANRED'
itab-anred.
PERFORM bdc_field USING 'LFA1-NAME1'
itab-name1.
PERFORM bdc_field USING 'LFA1-SORTL'
itab-sortl.
PERFORM bdc_field USING 'LFA1-LAND1'
itab-land1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
cnt = 0.
LOOP AT jtab WHERE j1 = itab-i1.
cnt = cnt + 1.
CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-banks.
CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankl.
CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankn.
IF cnt = 5.
cnt = 0.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
ENDIF.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-FDGRV'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFB1-AKONT'
itab-akont.
PERFORM bdc_field USING 'LFB1-FDGRV'
itab-fdgrv.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNA'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-WAERS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFM1-WAERS'
itab-waers.
PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-LIFNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'XK01'.
ENDLOOP.
PERFORM close_group.
Header file:
1 63190 0001 0001 0001 mr bal188 b in 31000 a1 inr
2 63191 0001 0001 0001 mr bal189 b in 31000 a1 inr
TC file:
1 in sb 11000
1 in sb 12000
1 in sb 13000
1 in sb 14000
1 in sb 15000
1 in sb 16000
1 in sb 17000
1 in sb 18000
1 in sb 19000
1 in sb 20000
1 in sb 21000
1 in sb 22000
2 in sb 21000
2 in sb 22000
REPORT zmm_pr_upload_mat
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Standard Include for Selection Screen
INCLUDE bdcrecx1.
Internal Table for Upload Data
DATA: BEGIN OF i_pr OCCURS 0,
Header Screen
sno(3), " SNo
bsart(004), " PR Type
epstp(001), " Item Category
knttp(001), " Account Assignment
eeind(010), " Delivery Date
lpein(001), " Category of Del Date
werks(004), " Plant
lgort(004), " Storage Location
ekgrp(003), " Purchasing Group
matkl(009), " Material Group
bednr(010), " Tracking No
afnam(012), " Requisitioner
Item Details
matnr(018), " Material No
menge(017), " Quantity
badat(010),
frgdt(010),
preis(014), " Valuation Price
waers(005), " Currency
peinh(005),
wepos(001),
repos(001),
sakto(010), " GL Account
kostl(010), " Cost Center
bnfpo(005),
END OF i_pr.
Internal Table for header Data
DATA: BEGIN OF it_header OCCURS 0,
sno(3), " SNo
bsart(004), " PR Type
epstp(001), " Item Category
knttp(001), " Account Assignment
eeind(010), " Delivery Date
werks(004), " Plant
lgort(004), " Storage Location
ekgrp(003), " Purchasing Group
matkl(009), " Material Group
bednr(010), " Tracking No
afnam(012), " Requisitioner
END OF it_header.
Internal Table for Item Data
DATA: BEGIN OF it_item OCCURS 0,
sno(3), " SNo
matnr(018), " Material No
menge(017), " Quantity
preis(014), " Valuation Price
sakto(010), " GL Account
kostl(010), " Cost Center
END OF it_item.
Data Variables & Constants
CONSTANTS : c_x VALUE 'X'. " Flag
DATA : v_l(2), " Counter
v_rowno(5), " Row No
v_2(2), " Counter
v_rows LIKE sy-srows, " Rows in TC
v_field(45). " String
Parameters
PARAMETERS: p_file LIKE ibipparms-path. " Filename
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start of Selection
START-OF-SELECTION.
Open the BDC Session
PERFORM open_group.
Upload the File into internal Table
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_pr
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT i_pr BY sno.
LOOP AT i_pr.
MOVE-CORRESPONDING i_pr TO it_item.
APPEND it_item.
CLEAR it_item.
AT END OF sno.
READ TABLE i_pr INDEX sy-tabix.
MOVE-CORRESPONDING i_pr TO it_header.
APPEND it_header.
CLEAR it_header.
ENDAT.
ENDLOOP.
SORT it_header BY sno.
SORT it_item BY sno.
v_rows = sy-srows - 6.
Upload the Data from Internal Table
LOOP AT it_header.
Header Data
PERFORM bdc_dynpro USING 'SAPMM06B' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBAN-BEDNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EBAN-BSART'
it_header-bsart.
PERFORM bdc_field USING 'RM06B-EPSTP'
it_header-epstp.
PERFORM bdc_field USING 'EBAN-KNTTP'
it_header-knttp.
PERFORM bdc_field USING 'RM06B-EEIND'
it_header-eeind.
PERFORM bdc_field USING 'RM06B-LPEIN'
it_header-lpein.
PERFORM bdc_field USING 'EBAN-WERKS'
it_header-werks.
PERFORM bdc_field USING 'EBAN-LGORT'
it_header-lgort.
PERFORM bdc_field USING 'EBAN-EKGRP'
it_header-ekgrp.
PERFORM bdc_field USING 'EBAN-MATKL'
it_header-matkl.
PERFORM bdc_field USING 'EBAN-BEDNR'
it_header-bednr.
PERFORM bdc_field USING 'EBAN-AFNAM'
it_header-afnam.
Item Details
v_l = 0.
To add no. of rows
v_2 = 0 .
As the screen is showing 13 rows defaulted to 130
v_rowno = 130 .
LOOP AT it_item WHERE sno = it_header-sno.
v_l = v_l + 1.
IF v_l = 14 .
IF v_2 = 12 .
v_2 = 12 .
v_l = 2 .
From second time onwards it is displaying 12 rows only
v_rowno = v_rowno + 120 .
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'RM06B-BNFPO'
v_rowno.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ELSE.
V_2 initialized to 12 for second screen purpose
v_2 = 12 .
v_l = 2 .
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'RM06B-BNFPO'
v_rowno .
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ENDIF.
ENDIF.
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
CLEAR v_field.
CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
PERFORM bdc_field USING v_field it_item-matnr.
CLEAR v_field.
CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
PERFORM bdc_field USING v_field it_item-menge.
PERFORM bdc_dynpro USING 'SAPMM06B' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBAN-PREIS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EBAN-PREIS'
it_item-preis.
PERFORM bdc_dynpro USING 'SAPMM06B' '0505'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBKN-SAKTO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'EBKN-SAKTO'
it_item-sakto.
Cost Center
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'COBL-KOSTL'
it_item-kostl.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
Call The Transaction
PERFORM bdc_transaction USING 'ME51'.
ENDLOOP.
Close the BDC Session
PERFORM close_group.
with regards,
Hema Sundara. -
How to fill internal table with selection screen field.
Hi all,
i am new to sap . pls tell me how to fill internal table with selection screen field.Hi,
Please see the example below:-
I have used both select-options and parameter on the selection-screen.
Understand the same.
* type declaration
TYPES: BEGIN OF t_matnr,
matnr TYPE matnr,
END OF t_matnr,
BEGIN OF t_vbeln,
vbeln TYPE vbeln,
END OF t_vbeln.
* internal table declaration
DATA : it_mara TYPE STANDARD TABLE OF t_matnr,
it_vbeln TYPE STANDARD TABLE OF t_vbeln.
* workarea declaration
DATA : wa_mara TYPE t_matnr,
wa_vbeln TYPE t_vbeln.
* selection-screen field
SELECTION-SCREEN: BEGIN OF BLOCK b1.
PARAMETERS : p_matnr TYPE matnr.
SELECT-OPTIONS : s_vbeln FOR wa_vbeln-vbeln.
SELECTION-SCREEN: END OF BLOCK b1.
START-OF-SELECTION.
* I am adding parameter value to my internal table
wa_mara-matnr = p_matnr.
APPEND wa_mara TO it_mara.
* I am adding select-options value to an internal table
LOOP AT s_vbeln.
wa_vbeln-vbeln = s_vbeln-low.
APPEND wa_vbeln TO it_vbeln.
ENDLOOP.
Regards,
Ankur Parab -
How to fill internal table dynamically
Hi All,
how to fill internal table dynamically.
for example:
begin of itab occurs 0,
empid like pa0000-pernr,
empname like pa0001-ename,
grade(5),
end of itab.
now i want to append dynamically field itab-grade along with rest fields.
is this possible?? if yes kindly let me know how to do that.
Regards,
Kiran IHi kiran,
To fill and create and internal table dynamically you can use this code.
TYPE-POOLS: slis.
DATA: it_fcat TYPE slis_t_fieldcat_alv,
is_fcat LIKE LINE OF it_fcat.
DATA: it_fieldcat TYPE lvc_t_fcat,
is_fieldcat LIKE LINE OF it_fieldcat.
DATA: new_table TYPE REF TO data.
DATA: new_line TYPE REF TO data.
FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
is_fieldcat-fieldname = 'FIELD1'.
is_fieldcat-ref_field = 'MATNR'.
is_fieldcat-ref_table = 'MARA'.
APPEND is_fieldcat TO it_fieldcat.
is_fieldcat-fieldname = 'FIELD2'.
is_fieldcat-ref_field = 'SPRPS'.
is_fieldcat-ref_table = 'PA0001'.
APPEND is_fieldcat TO it_fieldcat.
is_fieldcat-fieldname = 'FIELD3'.
is_fieldcat-ref_field = 'BEGDA'.
is_fieldcat-ref_table = 'PA0002'.
APPEND is_fieldcat TO it_fieldcat.
Create a new Table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
Create a new Line with the same structure of the table.
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
Test it...
DO 40 times.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = '12345'.
ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = 'X'.
ASSIGN COMPONENT 'FIELD3' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = '20030101'.
INSERT <l_line> INTO TABLE <l_table>.
ENDDO.
LOOP AT <l_table> ASSIGNING <l_line>.
ASSIGN COMPONENT 'field1' OF STRUCTURE <l_line> TO <l_field>.
WRITE / <l_line>.
ENDLOOP.
regards,
Aashish Garg -
How to fill a table UI element
hello,
how can I fill a table header?
any suggest?__day_ __hour_ month_ year_
Mo 2 July 2210
so i could fill the table with -
> Mo 2 July 2210
BUT not the header -
> day hour month year !!
Edited by: Scafandri on May 13, 2011 1:40 PM
Edited by: Scafandri on May 13, 2011 1:41 PM
Maybe you are looking for
-
'Unable to Launch Application Error' - Java Web Start Running Under MS IIS.
I am attempting to render the following .jnlp in MS IE: <?xml version="1.0" encoding="utf-8"?> <!-- JNLP File for LottoMadness Application --> <jnlp codebase="http://localhost/LottoMadness/" href="LottoMadness.jnlp"> <information> <titl
-
When attempting to send email photos on my iPhoto 11, I keep getting the message " THE EMAIL SERVER DIDN'T RECOGNIZE YOUR USERNAME/PASSWORD COMBINATION". However, I already have this info in my preferences/account section. What is the problem and h
-
Any way to change Export to Web defaults?
I like the Export to Web option in QuickTime Pro. What I don't like are the defaults it uses for Desktop and iPhone. Is there a way to change the defaults but still use this menu option? The long way is to of course export the files one at a time. Bu
-
Quicktime: The movie could not be opened. The file is not a movie file.
Hi, im sorry to say im a bit challenged when it comes to this so i hope you can help!... Im trying to import the movies from my Sony video recorder (handycam DCR-SR32) and when i open the folder for it on the desktop and try to open one of the files
-
Hello I am trying to export a clip using quicktime for use on a website. The clip has been green screened and distorted a bit to make person like a bit thinner. What settings would I use in quicktime to be able to send this clip to my webmaster (he u