How can i extend the table control while transfering the data
hi
how can i extend the table control while transfering the data.
Hi,
For table control we have to handle the page down (P+, or what ever function codes are assigned to that activity) activity with our coding.
Just check out this code:
This is the bdc to update the XK01 transaction code (Vendor Creation).
Here we will use table controls for bankings. Here Iam sending the coding and text files.
Coding
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+'. " Page down activity
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.
**Flat files for the above code***
Intial screen data 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
Table control Data:
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
Regards,
Kumar.
Similar Messages
-
How can I extend the range of my chart?
I've asked this question before on here, and found that shift-clicking for more cells has usually worked, but I have now run into a new problem...
My chart used to cover the range B5:P50. However, since moving a column it now only covers the cell range H5:P50. My chart is on a separate sheet. Usually if I want to add more to the range it will be downwards, so I just click on the chart, then click on the Main Sheet and shift-click to add more cells. Unfortunately, because the range I want is to the left of the highlighted area this time, I can't use shift-click.
How can I extend the range of my chart so it includes cells to the left of the currently selected range? In Excel I'd be able to just type the range in a box somewhere, rather than all this GUI-based clicking and dragging which is actually more difficult! Is there somewhere I can just type the range in that I want?
Thanks!"I want to add some series that are missing from the chart. How do I do that?"
Here's a two step process to do that:
Select the chart to show the the data selection on the associated chart.
Click in the leftmost column of the data, and drag left to change (move) the selection (blue arrow) for the result below:
Grab the control handle (small circle) at the bottom right corner of the selection, and drag right, as indicated by the blue arrow.
Result shown below.
Reassign colours and do other formatting as desired.
Regards,
Barry -
I get a neighbor's wifi on my MacBook in my bedroom. How can I extend the range to the MacMini in my living room?
You can't. It's not your network.
-
How can we delete the data in e-fact table.
how can we delete the data in e-fact table.
hii,
You cannot delete the request individually but you can one of the following:
1. Do a selective deletion from the cube. RSA1 -> Cube -> Contents -> selective deletion.
2. Delete all the data in the cube and then reconstruct only the required request ids. This would work only if you have the PSA available for all the requests.
3. Reverse posting is another possibility.
hope it helps,
partha -
How can i convert the data from mutiple-table to the other database(MSSQL)?
Dears,
How can i convert the data from mutiple-table to the other database such as MS-SQL?
I have a third party system based on MS-SQL 2000.
Now we want to make a integration between SAP R/3(Oracle) and SQL server.
When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
But i don't know which tools will help me reach the purpose. BAPI, LSMW, IDoc... ???
Would anybody tell me which way is better and how to do?
Thanks a lot!
Kevin WangHello Kevin,
The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier. -
How can I set the data binding between Web Dynpro & Database table
Dear friend,
I am a beginner of Web Dynpro. I want to develop my simple project like these:
1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
1. How can I set the data binding between Web Dynpro and Database table ?
2. Are there any nescessary steps that I will concern for this case?
Sorry if my question is simple, I had try to find solution myself, but it not found
Thanks in advances,
SeMsHi,
You can write your own connection class for establishing the connection with DB.
Ex:
public class ConnectionClass {
static Connection con = null;
public static Connection getConnection() {
try{
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
con = ds.getConnection();
return con;
}catch(Exception e){
return null;
You can place the above class file in src folder and you can use this class in webdynpro.
You can have another UserInfo class for reading and writing the data into the DB .
Regards, Anilkumar
PS : Refer
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
Message was edited by: Anilkumar Vippagunta -
Hi everyone, again landed up with a problem.
After trying a lot to do it myself, finally decided to post here..
I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
Because both the tables have same number of columns & column names.
Below are 2 tables with column names:
Table-1 (MONTHLY_PART_1)
Table-2 (MONTHLY_PART_2)
SL_NO
SL_NO
COMP
COMP
DUE_DATE
DUE_DATE
U-1
U-1
U-2
U-2
U-4
U-4
U-20
U-20
U-25
U-25
Since both the tables have same column names, I'm getting the following error :
Error 402 at line 103, column 4
alias required in SELECT list of cursor to avoid duplicate column names.
So How can i export the data to excel which has 2 tables with same number of columns & column names?
Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
Help me with this please.
Thank You.You'll have to *alias* your columns, not prefix it with the table names:
$[CHE_TEST@asterix1_impl] r
1 declare
2 cursor cData is
3 with data as (
4 select 1 id, 'test1' val1, 'a' val2 from dual
5 union all
6 select 1 id, '1test' val1, 'b' val2 from dual
7 union all
8 select 2 id, 'test2' val1, 'a' val2 from dual
9 union all
10 select 2 id, '2test' val1, 'b' val2 from dual
11 )
12 select a.id, b.id, a.val1, b.val1, a.val2, b.val2
13 from data a, data b
14 where a.id = b.id
15 and a.val2 = 'a'
16 and b.val2 = 'b';
17 begin
18 for rData in cData loop
19 null;
20 end loop;
21* end;
for rData in cData loop
ERROR at line 18:
ORA-06550: line 18, column 3:
PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
ORA-06550: line 18, column 3:
PL/SQL: Statement ignored
$[CHE_TEST@asterix1_impl] r
1 declare
2 cursor cData is
3 with data as (
4 select 1 id, 'test1' val1, 'a' val2 from dual
5 union all
6 select 1 id, '1test' val1, 'b' val2 from dual
7 union all
8 select 2 id, 'test2' val1, 'a' val2 from dual
9 union all
10 select 2 id, '2test' val1, 'b' val2 from dual
11 )
12 select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
13 from data a, data b
14 where a.id = b.id
15 and a.val2 = 'a'
16 and b.val2 = 'b';
17 begin
18 for rData in cData loop
19 null;
20 end loop;
21* end;
PL/SQL procedure successfully completed.
cheers -
lost all my pictures and videos while updating ios7.1.1.
i dont have backup to restore. how can i recover the data back?You should never update without making sure that you have saved everything on your computer first.
You should import all pics and vids before attempting any update.
If you have failed to save the data, then it is gone -
how can i extend the Apple TV storage to get an 1 TB? apple has any external hard disk or similar?
Only AppleTV1 has an internal PATA drive. The largest PATA drive available is 250gb.
Hacks are available to use the USB port on AppleTV1 to access more storage.
AppleTV2 does not have an internal drive.
Why do you need more storage in your AppleTV? iTunes streams video to AppleTV so no need to store it locally. -
HT1689 How can I extend the number of times my phone rings before going to answerphone
How can I extend the number of times my Iphone 4s rings before it goes to answerphone
Call you carrier and ask them how you can change this. The number of rings before voicemail kicks in is set by your carrier. Some have the option to do it from your phone if you know the sequence of codes to send, but you need to ask your own carrier how to do it for their system.
-
Upon Removing Ubuntu, How can I Extend the C and D Drive in Windows 7?
Upon Removing Ubuntu, How can I Extend the C and D Drive in Windows 7?
Previously, my Computer had Windows 7 and Ubuntu as a dual Boot. I followed some online instructions on how to Delete Grub (Ubuntu's Startup Boot Menu) and Ubuntu Partitions (<edited>) and it worked. I wanted to expand my remaining C and
D Partitions, but I couldn't figure out how to do it.
Windows 7's Disk Management shows my Laptop's only Disk divided into 3 logical drives ( i.e., the Recovery Drive, C, and D Drives). The Order of the Drives is Disk 0 is:
1.46 GB - Recovery Drive
53.71 GB - C Drive
42.79 GB - Free Space
191.19 GB - Drive for my Personal Data/Files
8.93 GB - Unallocated
NOTE: The Free Space and D Drive have a Green Box around them.
I would like to take the Free Space and Unallocated Space and apportion it between the C and D Drives., as stated prior, I'm not sure how to do this. Do you have any reliable and
preferably free options?Hi Bobby Marlee,
Please share us a screenshot about disk management.
If my understanding is right, you want to extend the C and D drive by using the free space and unallocated space.
If you want to use Disk Management to extend the drive space, I think we need to back up the files and delete Free Space, Drive for my Personal Data/Files, and then extend C: drive and create D: drive by using the Unallocated space.
For more information, please refer to the following article.
http://technet.microsoft.com/zh-cn/library/cc771473.aspx#BKMK_WINUI
Best regards,
Fangzhou CHEN
Fangzhou CHEN
TechNet Community Support -
How can i extend the customer to other sales area
how can i extend the customer to other sales area
Hello Harish,
Once you have a customer (eg. 100002) in one sales area (eg. 0010/10/10), you open XD01 tcode, enter the same customer number (100002) in customer field and enter sales area (say u want to create in 0020/10/10) in which you want to create the same customer. Now in Reference section, enter the customer number (100002) and sales area in which already the customer exists (0010/10/10). When you press enter, it allows you to modify the sales area data for the customer for new sales area.
then save it.
Hope it is clear... -
How can I extend the MRP Areas?
How can I extend the MRP Areas of a material for different warehouses by LSMW? Is there a specific field for it?
Ok, this is how my recording is built up (it ends with the same screen from the start):
RMMDDIBE 1000
BDC_CURSOR SO_WERKS-LOW
BDC_OKCODE =UCOMM4
SO_MATNR-LOW MATNR matnr
SO_WERKS-LOW WERKS plant
BDC_SUBSCR RMMDDIBE
RMMDDIBE 1000
BDC_OKCODE =CMDM
SO_MATNR-LOW MATNR matnr
SO_WERKS-LOW WERKS plant
BDC_SUBSCR RMMDDIBE
BDC_CURSOR SO_BERID-LOW
PANE X
SO_BERID-LOW MRP_AREA mrp_area
RMMDDIBE 0101
BDC_CURSOR SDIBE_MASSFIELDS-XLGP
BDC_OKCODE =SAVE
SDIBE_MASSFIELDS-XDISGR X
MDMA-DISGR DISGR MRP_group
SDIBE_MASSFIELDS-XDISMM X
MDMA-DISMM DISMM planningskenmerk
SDIBE_MASSFIELDS-XMINBE X
MDMA-MINBE MINBE bestelpunt
SDIBE_MASSFIELDS-XDISPO X
MDMA-DISPO DISPO Mrp controller
SDIBE_MASSFIELDS-XDISLS X
MDMA-DISLS DISLS lotzsize
SDIBE_MASSFIELDS-XBSTFE X
MDMA-BSTFE BSTFE fixed lotsize
SDIBE_MASSFIELDS-XSOBSL X
MDMA-SOBSL SOBSL special procurement key
SDIBE_MASSFIELDS-XLGPRO X
MDMA-LGPRO LGPRO issueing storage loc
SDIBE_MASSFIELDS-XLGFSB X
MDMA-LGFSB LGFSB stor location external procurement
SDIBE_MASSFIELDS-XPLIFZ X
MDMA-PLIFZ PFLITZ planlevertrijd
MDMA-PLIFZX X
RMMDDIBE 1000
BDC_CURSOR PA_PROSA
BDC_OKCODE =ONLI
SO_MATNR-LOW MATNR Matnr
SO_WERKS-LOW WERKS plant
PA_PROSA X
BDC_SUBSCR RMMDDIBE
PANE X
SO_BERID-LOW MRP_AREA mrp_area -
How can I extend the 2-year search window of Calendar search
How can I extend the 2-year search window of Calendar search in iPhone 5s ? I basically want 'Search' to search everything in the phone, not just restricted to a 2-year window.
See my link above... it's a documented limitation...
Calendar and Reminder search
Spotlight searches for the title of calendar events and reminders in a two-year window—it will reveal results from one year in the past and one year in the future. If an event has recurrences that fall in this range, it will find the event that is closest to the current date.
If multiple events have similar details (title, notes, location, and so on) and you search for these details, Spotlight will show the most recent event. To see more results, use search in Calendar or Reminders. -
My time capsule backup space is full yet, how can i extend the backup space?
how can i extend the backup space?
Two possibilities:
Add a new USB hard drive to the Time Capsule and start a new full backup and move forward from that point.
(Unfortunately, it is not possible to have Time Machine simply continue backups on a new drive. You have to start over with a new full backup.)
Or, if you decide that you really do not need all the old backups on the Time Capsule, the disk can be erased and you can start over with a new full backup and move forward.
Maybe you are looking for
-
I am trying to use powerpoint but when I open a document I want to work on it does not open on my desktop. It appears as open on mission control but it disappears offscreen. How can I get it to open where i need it and can work on it?
-
How Can I improve the time it takes to start PSE 9's Back up?
PSE's backup to external HDD has always seemed to be clunky. For example, when the process starts and you are taken step-by-step through browsing for your HDD and then creating your next incremental backup file and then browsing again to your last ba
-
MRP background job generating Plnd Ord instead of Pur Req
Hi Gurus, There is a variant created for background job of MRP, which is running once in a day. In this varaint, I have control parameters set in such a way in that , it should create purchase requisition ( Purchase requisitions in opening period = 3
-
Camera Raw shrinks my 23MB cr2 file to a 7MB jpg...
I am trying a demo version of Photoshop CS5 and I like it so far. I am mainly using Bridge to edit my .cr2 photos and convert them to .jpg files. I am noticing that my .cr2 files start out around 23mb (I have a Canon 7D) and after tweaking color, s
-
Situation: Multiple identical documents are attached to multiple identical process step nodes in one project. To ease document management/maintenance, these documents are linked. Now, if these multiple identical and linked documents are copied and lo