How can we write BDC program to upload data in to line items(VA01) ?
Error in processing BDC table control program...
How can i populate data through bdc program dynamically, when some of the lines are in disable mode....
for e.g ...
in va01 transaction code ....
1 to 5 lines are not in disable mode....
but 5 to 10 lines are in disable mode...
so hw u process those remaining disable lines at runtime and populate data in to the fields of line items...through bdc program..
hi..friends.,
yea actually this question has been raised by interviewer ...
but just the same i replied as you did...
but he told that we can upload the data....towards in to disabled line items
at run time..with using change trasaction va02..with implementing bdc programm...
so i just want to know the steps of how to perform it..
Can anyone....my friends..
byeeee.....
Similar Messages
-
How can I write a program that compiles without warnings?
I tried the following with the 1.5 beta-compiler (build 28; I think):
class Y {
public static final class Pair<X,Y> {
private X fst;
private Y snd;
public Pair(X fst, Y snd) {this.fst=fst; this.snd=snd;}
public X getFirst() { return fst; }
public Y getSecond() { return snd; }
public String toString() { return "("+fst+","+snd+")"; }
public static void main(String... args) {
Pair[] pairArr = new Pair[10]; // supposed to be an array of Pair<Integer,Integer>
for (int i=0; i<pairArr.length; i++)
pairArr[i] = new Pair<Integer,Integer>(i,i);
for (int i=0; i<pairArr.length; i++) {
Pair<Integer,Integer> p = pairArr; // unchecked warning
System.out.println(p);
Integer first = p.getFirst();
Integer second = p.getSecond();
// ... more stuff ...
It turns out that I get an unchecked warning when I extract an element from the array of pairs. Okay, that's fine. How can I avoid the warning? I had expected that an explicit cast would help.
Pair<Integer,Integer> p = (Pair<Integer,Integer> )pairArr;
With a cast I'm telling the compiler: "I _know_ what I'm doing; please trust me." But the compiler still issues a warning.
How can I write a warning-free program in this case? The only thing I can think of, is not using the parameterized type Pair in its parameterized form. But it's not the idea of Java Generics that I refrain from using parameterized types. What am I missing?It turns out that I get an unchecked warning when I
extract an element from the array of pairs. Okay,
that's fine. How can I avoid the warning? I had
expected that an explicit cast would help.
Pair<Integer,Integer> p = (Pair<Integer,Integer>
)pairArr;
With a cast I'm telling the compiler: "I _know_ what
I'm doing; please trust me." But the compiler still
issues a warning. Yes, but at least you were able to change the warning from "unchecked assignment" to "unchecked cast" which is a little shorter ;-)
Seriously , since arrays of generic types are disallowed, there is probably no way to get rid of these warnings - which makes a strong point for eliminating "unchecked" warnings altogether (see the other thread "selectively suppressing compiler warnings")
Cheerio,
Gernot -
I would like to know how can i Change the program so that the Message'What is the sum of X and Y' can be shown in a GUI after I click the Start Button.
The program is shown below. Please help me,Thank You Very Much!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class client2 {
public static void main(String[] args){
Frame f = new ClientFrame("Client");
f.setSize(400,400);
f.setVisible(true);
class ClientFrame extends JFrame{
JPanel StartPanel = new JPanel();
JPanel OutputPanel = new JPanel();
String Question;
JLabel label=new JLabel(Question);
Button GameStart = new Button("Start the Game");
Container c=this.getContentPane();
public ClientFrame(String title){
super (title);
c.setLayout (new BorderLayout());
StartPanel.add(GameStart);
OutputPanel.add(label);
c.add(StartPanel,BorderLayout.NORTH);
c.add(OutputPanel,BorderLayout.CENTER);
GameStart.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Evt) {
GameStart.setEnabled(false);
Integer x=10;
Integer y=20;
Question ="What is the sum of "+x+ "and" +y;
System.out.println("Java rules!");
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent evt) {
System.exit(0);
}This code won't even compile.
Anyway, you should set the field Question's value to the String, when you declare it, before you use it in the label.
Also, you should name your local variables with names that start with lower-case letters. That's one of Java's naming conventions, and it makes your code easier to read. -
Changes in BDC program to upload data from text/excel file
Hi friends i have obtained the BDc program after recording :
start-of-selection.
perform open_group.
perform bdc_dynpro using 'SAPLCOIH' '0100'.
perform bdc_field using 'BDC_CURSOR'
'CAUFVD-GSBER'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'AUFPAR-PM_AUFART'
'PM01'.
perform bdc_field using 'CAUFVD-IWERK'
'460a'.
perform bdc_field using 'CAUFVD-GSBER'
'2460'.
perform bdc_field using 'CAUFVD-EQUNR'
'10000009'.
perform bdc_dynpro using 'SAPLCOIH' '3000'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'CAUFVD-KTEXT'
'abc'.
perform bdc_field using 'CAUFVD-INGPR'
'GM'.
perform bdc_field using 'CAUFVD-VAPLZ'
'RTN_VELR'.
perform bdc_field using 'CAUFVD-VAWRK'
'460A'.
perform bdc_field using 'BDC_CURSOR'
'CAUFVD-GLTRP'.
perform bdc_field using 'CAUFVD-GSTRP'
'1.8.2010'.
perform bdc_field using 'CAUFVD-GLTRP'
'1.8.2010'.
perform bdc_field using 'CAUFVD-TPLNR'
'RTNP-HIG'.
perform bdc_field using 'CAUFVD-EQUNR'
'10000009'.
perform bdc_field using 'AFVGD-INDET'
'1'.
perform bdc_field using 'AFVGD-WERKS'
'460A'.
perform bdc_field using 'AFVGD-STEUS'
'PMIN'.
perform bdc_field using 'AFVGD-ARBEH'
'H'.
perform bdc_field using 'AFVGD-DAUNE'
'H'.
perform bdc_dynpro using 'SAPLCOIH' '3000'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'BDC_CURSOR'
'CAUFVD-KTEXT'.
perform bdc_field using 'CAUFVD-KTEXT'
'abc'.
perform bdc_field using 'CAUFVD-INGPR'
'GM'.
perform bdc_field using 'CAUFVD-VAPLZ'
'RTN_VELR'.
perform bdc_field using 'CAUFVD-VAWRK'
'460A'.
perform bdc_field using 'CAUFVD-GSTRP'
'01.08.2010'.
perform bdc_field using 'CAUFVD-GLTRP'
'01.08.2010'.
perform bdc_field using 'CAUFVD-TPLNR'
'RTNP-HIG'.
perform bdc_field using 'CAUFVD-EQUNR'
'10000009'.
perform bdc_field using 'AFVGD-LTXA1'
'abc'.
perform bdc_field using 'AFVGD-INDET'
'1'.
perform bdc_field using 'AFVGD-ARBPL'
'RTN_VELR'.
perform bdc_field using 'AFVGD-WERKS'
'460A'.
perform bdc_field using 'AFVGD-STEUS'
'PMIN'.
perform bdc_field using 'AFVGD-ARBEH'
'H'.
perform bdc_field using 'AFVGD-DAUNE'
'H'.
perform bdc_transaction using 'IW31'.
perform close_group.
after executing it has two options.one is for call transactioin and other is for with session.Now i want to do the uploading from text file.Please guide me how to achieve that and what should be the order of fields in the text file.I am just a beginner.I know how to do that with LSMW bt trying BDc first time for creating PM ordersYou can use class "cl_gui_frontend_services". First you must select file with "file_open_dialog" method and the you can upload file with "gui_upload" method into internal table. Here is a sample: (I didn't try the code but I'm sure you can get it working, there are lots of sample codes about that. You can also search FM "GUI_UPLOAD").
REPORT zreport.
DATA:
gv_subrc TYPE sysubrc,
gv_result TYPE abap_bool,
gt_data_tab type table of zstruc.
PARAMETERS: p_fname LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
PERFORM file_open_dialog USING space space space space
CHANGING p_fname gv_action gv_subrc.
START-OF-SELECTION.
PERFORM gui_upload TABLES gt_data_tab
USING p_fname CHANGING gv_subrc.
*** FORMS ***
FORM file_open_dialog USING pv_window_title
pv_default_extension
pv_default_filename
pv_initial_directory
CHANGING pv_filename
pv_user_action
pv_subrc.
DATA:
lt_file_table TYPE filetable,
lv_rc TYPE i,
lv_initial_directory TYPE string.
IF pv_initial_directory IS INITIAL.
PERFORM get_desktop_directory CHANGING lv_initial_directory.
ELSE.
lv_initial_directory = pv_initial_directory.
ENDIF.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = pv_window_title
default_extension = pv_default_extension
default_filename = pv_default_filename
* file_filter =
* with_encoding =
initial_directory = lv_initial_directory
* multiselection =
CHANGING
file_table = lt_file_table
rc = lv_rc
user_action = pv_user_action
* file_encoding =
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5
pv_subrc = sy-subrc.
IF pv_subrc EQ 0.
READ TABLE lt_file_table INTO pv_filename INDEX 1.
ENDIF.
ENDFORM.
FORM gui_upload TABLES pt_data_tab
USING pv_filename
CHANGING pv_subrc TYPE sysubrc.
DATA:
lt_data_tab TYPE TABLE OF string,
lv_filename TYPE string.
lv_filename = pv_filename.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lv_filename
filetype = 'ASC'
has_field_separator = 'X'
* header_length = 0
* read_by_line = 'X'
* dat_mode = SPACE
* codepage = SPACE
* ignore_cerr = ABAP_TRUE
* replacement = '#'
* virus_scan_profile =
* show_transfer_status = 'X'
* IMPORTING
* filelength =
* header =
CHANGING
data_tab = lt_data_tab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19
pv_subrc = sy-subrc.
IF pv_subrc EQ 0.
pt_data_tab[] = lt_data_tab[].
ENDIF.
ENDFORM. -
How can i write and read the same data
hi,
i have attached my program to this mail. i have some problems in this program.
problems:
1. I want to select the threshold for the rms,varience and s.d.
But what i used is not doing that. i want to fix the upper threshold value and lower threshold value.
when ever the input crosses upper threshold value i want the output and it will remains uptill the value above the lower threshold value.
Once it come down the lower threshold value the output should be stopped.
2. I want to write this in to a file and i want to read this file. is this possible or not.
please try to help me i am very new with lab view6i
REGARDS
CHAMARTHY KOMAL DILEEP.
[email protected]
Attachments:
dileep.vi 93 KBThe easiest way to perform a certain action (such as file I/O) based on a certain condition (such as whether a value has passed a certain threshold) is to use a comparison VI in combination with a case structure. Then you can specify that if your rms, standard deviation and variance are above a threshold then perform a certain action.
Also consider using shift registers to keep track of data from the last loop. If I understand you correctly, you want to start logging data when an upper threshold has been passed. Then you want to continue logging data until a lower threshold is passed. I have attached a non-functional but explanatory VI that will help explain how to implement logic to that effect. It also demonstrates that you can indeed write and read from the same file in a loop. The best way to do this is to open the file before the loop, do all the necessary writing and reading in the loop, and then close the file after the loop.
Hope this helps!
Jarrod S.
National Instruments
Attachments:
dileep_example.vi 61 KB -
BDC Program for Uploading Data for Property Tree in cg02
Hi,
How to upload data for property tree ( standard Properties ) of CG02. I checked for BAPI or Function Module but most them supports for specification header and sub item.
Please Let me know if any function module or BAPI available for this process. I tried with BDC Program, but it fails.
Regards,
Rajesh Kumar MurugesanHallo Rajesh
take a look here:
http://help.sap.com/erp2005_ehp_06/helpdata/en/c1/eda0f591ec12408b25e7a1b369ca45/frameset.htm
Chapter "Import and Export".
1.) Reads cross these further chapters:
"Tools (EHS-BD-TLS)" => "IMport and Export" => "Import: Process" => "Specifying the Sequence of the External Data Structure " => "External File Structure: Specification"
Here you will learn how to prepare the data. In chapter:" Example: Transfer File for Specifications" you will find an example of an file whcih could be used to upload data in the property tree
2.) Chapter:" Importing Specifications" is explaining the steps whcih are need to populate the property with data using the file as prepared; read cross chapter "Specification Import Control"
I hope this helps.
C.B.
Edited by: Christoph Bergemann on Feb 4, 2012 6:59 PM
Edited by: Christoph Bergemann on Feb 4, 2012 6:59 PM -
How can I disable the Reason for Rejection field in VA02 line items
Hi,
I dont want the users to be able to change the reason for rejection field in the sales order line items. Can someone please suggest a tried and tested way of doing this
Thanks for reading.Set up an auth object for the field. In userexit field modification check the auth object and set the field to be grayed out if they don't have authority. Users can then not change the value of the field Sample code
IF screen-name = 'VBAP-ABGRU'.
AUTHORITY-CHECK OBJECT 'Z_BLK_REAS'
ID 'ABGRU' DUMMY.
IF sy-subrc EQ 0.
screen-input = 1.
ELSE.
screen-input = 0.
ENDIF.
ENDIF. -
How can i write Recursive Program in PL/SQL
Hi, i am new to Pl/sql Programming can any one suggest me with an example.
I need to implenet this logic in one of my Procedure functionalityI have to find whether my Userkey belongs to some groups and in that Gr
oups there can be many more subgroup which means my user is indirectly
associated with all Groups and Sub Groups so i need to check with the levels
till the time there is no SubGroups associated with my the Main Group G1 are
there.Seems you just need the hierarchy query:
SQL> SELECT groups.grp, level
2 from
3 (
4 select 'Group' grp, null parent from dual
5 union all
6 select 'Subgroup 1', 'Group' from dual
7 union all
8 select 'Subgroup 2', 'Group' from dual
9 union all
10 select 'SubSub 1', 'Subgroup 2' from dual
11 union all
12 select 'SubSub 2', 'Subgroup 1' from dual
13 ) groups
14 start with grp = (select grp from
15 (
16 select 'Key1' key, 'Subgroup 1' grp from dual
17 union all
18 select 'Key2' key, 'Subgroup 2' grp from dual
19 ) userkeys
20 where key = 'Key1'
21 )
22 connect by prior groups.grp = groups.parent
23 /
GRP LEVEL
Subgroup 1 1
SubSub 2 2Rgds. -
Need to write BDC program for Transaction VA01(Sales order creation)
Dear Friends,
I need to write a BDC program for uploading data into sap from an excel sheet file. The data contain Material Description,Customer Name,Date of Delivery,Quantity,Unit of measure etc.
material desc customer date of delivery quantity unit of measure
abcdf xyz ltd 24.12.2011 2 4 gm
The transaction is VA01.How will I find the correct fields and related tables? What are the related fields needed in the transaction VA01.
Thanking you
Sacheen Pukhrambam
Moderator Message: Put some self-effort before posting your question. Thread locked.
Edited by: Suhas Saha on Nov 25, 2011 1:25 PMHello,
You could try using a BDC with VL04 but first preference would be to see if there are any BAPI functions (search for BAPI) that can do this.
If BUS2032 doesn't have an attribute that you want (eg shipping point) then sub-delegate to ZBUS2032 and add the attribute, it's straightforward. You just have to know how to determine the value programmatically.
regards
Rick Bakker
hanabi technology -
How can I write program in Labview for zbrain kit..??
Hello everybody
I need to write the program in Labview fro Zbrain kit. I need to write code for multiple analog input (through multiple channels) that results multiple digital output. I found one refrence code which has one analog input (one channel) and gives one digital output.
I also need to save data for channels. I have no idea how can I save data for channels.
I have attached here the base program. Please give me idea how can I understand this program so that I can complete following tasks:
1. Save data for one channel and later for multiple channels
2. Modify the number of channels from one channels to multiple channels.
Actually I have gone through the videos and text based content(basics in labview) but I am unable to write the code.
Attachments:
Analog_3_InBlock.vi 131 KBHi,
Attached is an example snipped with some more comments on how to acquire multiple channels on a ZBrain platform that is based on an Analog Devices Blackfin processor. Just drag and drop it into your LabVIEW diagram. More examples can be found here: http://wiki.schmid-engineering.ch/zsystem/doku.php?id=example_zmc_adc-dma_continous. The idea behind dynamic data acquisition on a microprocessor is simple: you define the channels (up to 6x) , sampling frequency (up to 250kHz) and block sizes (up to 65'000) and start the acquisition. The underlying driver model samples in the data in parallel and the LabVIEW program gets this data. While e.g. processing the data, the underlying driver model continues sampling new data.
I hope this helped.
Marco Schmid
Schmid Engineering
Attachments:
snippet_zmc_adc-dma_continuous.png 107 KB -
How can I Write a sine wave in an Access-fil​e?
I measure a sine wave in LabView 6i. How can I write the datas automatically to an Acces-file, at the same time?
In my program, I managed it with Execute SQL.vi, I change a number in a SQL statement(String) -> after this I push start and then it writes the statement in the Access-file.
The problem is, it writes only one data per measurement in the file. How can I write all datas in the Access-file and measure the wave at the same time?
Thanks for help!
Attachments:
getwave.vi 49 KBOn the waveform palette, you will find a "to components" vi that you can break out the array of the waveform. You can then, using a for loop write all of the values from the waveform.
Better yet, there are examples in the database toolkit manual on pages 3-13 to 3-15 that deal with reading arrays (and even has a waveform example).
Good luck! -
Problem in the BDC program to upload the data from a flat file.
Hi,
I am required to write a BDC program to upload the data from a flat file. The conditions are as mentioned below:-
1) Selection Screen will be prompted to user and user needs to provide:- File Path on presentation server (with F4 help for this obligatory parameter) and File Separator e.g. @,#,$,%,... etc(fields in the file will be separated by using this special character) or fields may be separated by tab(tab delimited).
2) Finally after the data is uploaded, following messages need to be displayed:-
a) Total Number of records successfully uploaded.
b) Session Name
c) Number of Sessions created.
Problem is when each record is fetched from flat file, the record needs to be split into individual fields separated by delimiter or in case tab separated, then proceeding in usual manner.
It would be great if you provide me either the logic, pseudocode, or sample code for this BDC program.
Thanks,Here is an example program, if you require the delimitor to be a TAB, then enter TAB on the selection screen, if you require the delimitor to be a comma, slash, pipe, whatever, then simply enter that value. This example is simply the uploading of the file, not the BDC, I assume that you know what to do once you have the data into the internal table.
REPORT zrich_0001.
TYPES: BEGIN OF ttab,
rec TYPE string,
END OF ttab.
TYPES: BEGIN OF tdat,
fld1(10) TYPE c,
fld2(10) TYPE c,
fld3(10) TYPE c,
fld4(10) TYPE c,
END OF tdat.
DATA: itab TYPE TABLE OF ttab.
data: xtab like line of itab.
DATA: idat TYPE TABLE OF tdat.
data: xdat like line of idat.
DATA: file_str TYPE string.
DATA: delimitor TYPE string.
PARAMETERS: p_file TYPE localfile.
PARAMETERS: p_del(5) TYPE c.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
DATA: ifiletab TYPE filetable.
DATA: xfiletab LIKE LINE OF ifiletab.
DATA: rc TYPE i.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = ifiletab
rc = rc.
READ TABLE ifiletab INTO xfiletab INDEX 1.
IF sy-subrc = 0.
p_file = xfiletab-filename.
ENDIF.
START-OF-SELECTION.
TRANSLATE p_del TO UPPER CASE.
CASE p_del.
WHEN 'TAB'.
delimitor = cl_abap_char_utilities=>horizontal_tab.
WHEN others.
delimitor = p_del.
ENDCASE.
file_str = p_file.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = file_str
CHANGING
data_tab = itab.
LOOP AT itab into xtab.
CLEAR xdat.
SPLIT xtab-rec AT delimitor INTO xdat-fld1
xdat-fld2
xdat-fld3
xdat-fld4.
APPEND xdat to idat.
ENDLOOP.
LOOP AT idat into xdat.
WRITE:/ xdat-fld1, xdat-fld2, xdat-fld3, xdat-fld4.
ENDLOOP.
Regards,
Rich Heilman -
a gap between letters started to show in my indesign files. tried to undo with tracking, then with the paragraph settings. nothing helped. it ruins the fluent view of the document. how can i restore the program so that doesn't happen?
for example: say i write a paragraph. then, in a weird some sort of way an involuntary gap suddenly appears between different letters of random words(i did not recognize any pattern to the gap appearing) throughout the entire paragraph. once i've double clicked on that paragraph, and made a minor change, lets say tapped a 'space' key, and then clicked ctrl+z to undo, it has aligned(or fixed) the entire paragraph and made it look ok again. i've tried numerous ways to undo the entire thing, but cannot find the reason. i've been working for a few years and there's no reason why this thing all of a sudden should happen right now.
if anyone has stumbled on something like that and can advise, i would welcome it.
MNS-KG
Vadimyep...i'm typing with hebrew. i'll make a printscreen with the settings you've asked for@:
if you look closely you'll see that almost every line has a single letter apart. in hebrew there is no usually a singe letter structured words. -
How can I get this program to work -- Adobe Send or Adobe SendNow
How can I get this program to work? I have used Adobe SendNow successfully for several years and am on automatic renewal and getting nothing but frustration for my money! I have been unsuccessful at sending anything in the past several months. Today while working on a deadline and many unsuccessful attempts to upload files, I signed up for a free trial at a competitor in order to get my files sent. Want a refund -- or better yet, keep my money and get it to work right again.
You can't.
Sounds like it he gave you a stolen iPhone or at least a worthless one. -
How can I write mathematical formulas?
How can I write mathematical formulas?
I tried tu use the formula editor of ms word with paste and copy but it didnt work, because the formula
was not in line with the text.I was able to use Word's equation editor; just type in the formula and copy it into the Pages document.
I've heard you can do the same thing with the equation bar in Grapher utility, but I haven't tried that.
Other options involve LaTeX, which is a typesetting program. I've looked at that but haven't really explored it.
Maybe you are looking for
-
Multiclip in Mpeg4 = render all the time!
Hi everyone. I am running a multiclip session. All the files are from a flip ultra HD which gives me an mpeg 4 format and they need to be synced with a song. No problem to sync... However... I have 5 angles on the band... and this is a nightmare... E
-
Service Registry - Services without documentation
Hi all, how can i add a documentation to my services in the service registry? Documentation URL: There is no documentation URL available regards
-
PLS-00302: component 'SET_NO_OUTLINES' must be declared on EXP
Hey all, Not sure why I'm getting this. Any ideas where to start? C:\>exp userid=me/me@mine owner=me file=c:\temp\me.dmp Export: Release 10.2.0.1.0 - Production on Tue Aug 9 11:14:00 2005 Copyright (c) 1982, 2005, Oracle. All rights reserved. EXP-00
-
ICloud Photostream not working with Windows 7 or 8.1
Since iOS8 came out, my Windows PC's have not been working with the iCloud Photostream. I have gone through 4.0 - 4.0.2 now, with no success. I have tried all the supposed fixes. My MAC works fine updating, but not any of my PC's. I just can't make t
-
Concurrent timers are not getting invoked for same timer inf
Do weblogic has some parameter in weblogic deployment descriptor like numAlarmThreads="5" minThreads="1" maxThreads="10" etc becoz I am facing one problem relating to timer service in EJB Problem Scope: Concurrent timers are not getting invoked for s