Question about BDC program

I wanna to write a program for creating profit center (KE51). Here are part of the codes:
form create_profit_center.
  refresh bdctab.
  perform fill_screen using:
    'SAPLRKPM' '0200' 'X' space space,
    space space space 'PRCT_V-PRCTR' 'TEST1',
    space space space 'BDC_OKCODE' '/0',
    'SAPLRKPM' '0298' 'X' space space,
    space space space 'PRCT_V-DATAB' '01.01.2005',
    space space space 'PRCT_V-DATBI' '31.12.9999',
    space space space 'PRCT_V-KTEXT' 'Test Profit Center 3',
    space space space 'PRCT_V-LTEXT' 'Test Profit Center 3',
    space space space 'PRCT_V-VERAK' 'ABC',
    space space space 'PRCT_V-KHINR' '1001',
    space space space 'BDC_OKCODE' 'PRCT_SCREEN_CC'.
    call transaction 'KE51' using bdctab mode 'A' update 'S'.
    if sy-subrc <> 0.
      write :/ 'Error when creating profit center.'.
    endif.
endform.
form fill_screen using program
                       dynpro
                       dynbegin
                       fnam
                       fval.
  clear bdctab.
  bdctab-program = program.
  bdctab-dynpro = dynpro.
  bdctab-dynbegin = dynbegin.
  bdctab-fnam = fnam.
  bdctab-fval = fval.
  append bdctab.
endform.
When I execute the program in mode 'A' (view all the input screen), the program got stuck to the first screen. I can't see any fields (at least I expected the field 'PRCT_V-PRCTR is filled with the value 'Test1')being filled but only an error 'Make an entry in all required fields'.
Can anyone please help? Thanks!

Thanks for your reply.
I have tried to add
Data: V_kokrs like csks-kokrs value 'CA01'.
SET PARAMETER ID 'CIC' FIELD V_KOKRS.
OR
perform fill_screen using:
'SAPLSPO4' '0300' 'X' space space,
space space space 'SVALD-VALUE'<Controlling Area>,
space space space 'BDC_OKCODE' 'FURT'.
but it does not work. The error still exists.
I know that it is required to enter the controlling area before creating profit center. But when you have once saved the controlling area, it will no longer automatically prompt out when using t-code ke51 again. You need to go to the menu 'Extras -> set controlling area' if you wanna to set the controlling area again. So during recording, the starting screen is 'SAPLRKPM' '0200' instead of 'SAPLSPO4' '0300'. I just wonder in normal case you got stuck in a screen, your input value will be colored in red. But in my case, even I have set the value of profit center, the field is still blank.
I will now try to do it via BAPI. But I am still have interest in what's wrong with the BDC. Thanks!

Similar Messages

  • Question about the programming of a legend

    Hello everybody,
    I have a question about the programming of a waveform's legend. I
    already asked here in this forum about the legend programming (03)
    months ago.
    I went satisfied but I ve just noticed that this code
    (See Code old_legend_test.llb with main.vi as main function) operates a
    little different from my expectances.
    Therefore I have a new question and I want to know if it
    is possible by labview programming to plot and show, on a waveform
    chart, a signal with activ plot superior to zero (0) without to be
    obliged to plot and show a signal with activ plot equal to zero (0) or
    inferior to the desired activ plot.
    I give you an example
    of what I m meaning. I have by example 4 signals (Signal 0, 1, 2 and 3)
    and each signal corresponds respectively to a channel (Chan1, Chan2,
    Chan3, Chan4). I want to control the legend (activ plot, plot name and
    plot color) programmatically. Is it possible with labview to plot signal
    1 or 2 or 3 or (1, 3) or (2,3) or (1,2,3) or other possible combination
    without to active the signal with the corresponding activ plot zero
    (0)?
    Let see the labview attached data
    (new_legend_test.llb with main.vi as main function). When I try to
    control the input selected values again I get them back but I don't
    understand why they have no effect on the legend of my waveform chart.
    Could somebody explain me what I m doing wrong or show me how to get a
    correct legend with desired plots? Thank by advance for your assistance.
    N.B.
    The
    both attached data are saved with labview 2009.
    Sincerly,PrinceJack
    Attachments:
    old_legend_test.llb ‏65 KB
    new_legend_test.llb ‏65 KB

    Hi
    princejack,
    Thanks for
    posting on National Instruments forum.
    The behavior
    you have is completely normal. You can control the number of row displayed in
    the legend and this rows are linked to the data you send to your graph. Thus,
    if you have 3 arrays of data, let say chan1, chan2 and chan3, you can choose
    which data you want to display in your graph using the property node (Active
    plot and visible). But for the legend as you send 3 plots there is an array of
    the plot name [chan1, chan2, chan3] and you can display 0, 1, 2 or 3 rows of
    this array but you cannot control the order in this array! So, to be able to
    change this array you have to only send data you need to you graph. I'm not
    sure my explanations are clear so I have implemented a simple example doing
    that.
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/
    Attachments:
    GraphLegend.vi ‏85 KB

  • [Theory] A simple but hard question about OO programming

    I was in my first class of OO programming (4th year of computer engineering in Valencia) and the professor gave us homework.
    The homework was a simple question about OO programming (it is not about a specific language, though we are going to use Java in the practice sessions), we shall find an answer to it and discuss it in class the next day.
    The question was:
    "May classes also be objects?"
    which can be said as:
    "May classes be instances of an(other) classes?"
    I hope that you, archers, can enlighten me in this question

    tvale wrote:I believe an object is an instance of a class.
    Yup, that's true. Let's see... An object is an instance of a class, so we can have a lot of objects coming from one class.
    We can say an object is not a class because it has a state (think about a light, it has a state: on or off, but a class light is not on/off, because in a class we just describe the behavior that class should have.
    But what we're asking here is if a class can have a state. I think it may refer to static properties about the objects.

  • Hello my company Favorites I would like to first thank you for this wonderful program I have a question about the program. How can I Arabization program In your response to the spread accept me thanks and respect

    Hello my company Favorites I would like to first thank you for this wonderful program I have a question about the program. How can I Arabization program In your response to the spread accept me thanks and respect

    Hi ,
    You might want to refer the following link to find your serial number and activate your software .
    Here is the link for the same.
    https://helpx.adobe.com/x-productkb/global/find-serial-number.html
    Let us know how it goes .We'll do the best possible to get your issue fixed.
    Regards
    Sukrit Dhingra

  • About BDC Programming.

    Hi to all...
           I have a doubt in BDC Programming, I have a sample program of a BDC and i have executed it by uploading a .txt File.. But i
    can't able to know that whether the values are uploaded into the transaction or not. I also Like to Know about the Further
    Process  after executing the BDC report.. I don't Know how to View it in my transaction.. Can anyone Explain and Clear my
    Doubt.
    Moderator message: sorry, these forums cannot replace proper training, please search for available documentation or attend classes.
    locked by: Thomas Zloch on Sep 29, 2010 3:36 PM

    Hi..
    Basically I trying to Learn the BDC Programming now... I got an idea about BDC, But i can't able to know what is happening in it..
    Can You Have any sample Program With any comments Means Pls can you post it...

  • Questions on BDC program statements.....

    Hi,
    Currently i am checking below BDC program for packing material use.
    But there is a statement that i am not very clear what it is for...
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-EXIDV(01)'.
    For the  'V51VE-EXIDV(01)', here why need to add an (01) at the end.  What does the (01) means??
    Thanks!!!!
      LOOP AT i_lips.
        CLEAR: i_bdc_tab,i_msg_tab.
        REFRESH: i_bdc_tab,i_msg_tab.
        PERFORM bdc_dynpro      USING 'SAPMV50A' '4004'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LIKP-VBELN'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LIKP-VBELN'
                                      i_lips-vbeln.
        PERFORM bdc_dynpro      USING 'SAPMV50A' '1000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=VERP_T'.
    *perform bdc_field       using 'LIKP-BLDAT'
    *                              record-BLDAT_002.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LIPS-POSNR(01)'.
    *perform bdc_field       using 'LIKP-WADAT'
    *                              record-WADAT_003.
    *perform bdc_field       using 'LIKP-WAUHR'
    *                              record-WAUHR_004.
    *perform bdc_field       using 'LIKP-BTGEW'
    *                              record-BTGEW_005.
    *perform bdc_field       using 'LIKP-GEWEI'
    *                              record-GEWEI_006.
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-VHILM(01)'.
        PERFORM bdc_field       USING 'V51VE-VHILM(01)'
                                      'BOX'.
    *Select all materails
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=HU_MARKA'.
    *Select all Boxes
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=HUMARKHU'.
    *perform bdc_field       using 'V51VE-SELKZ(01)'
    *                              record-SELKZ_01_008.
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=HU_VERP'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-EXIDV(01)'.
        PERFORM bdc_dynpro      USING 'SAPLV51G' '6000'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SICH'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V51VE-EXIDV(01)'.
        CALL TRANSACTION 'VL02N' USING i_bdc_tab
                          MODE p_mode
                          MESSAGES INTO i_msg_tab.
    Message was edited by:
            Hoo Laa

    And if this is a BDC running in background, or a call transaction, then placing the cursor on a given field has no effect unless it is needed for navigation to the next screen. 
    When you record a BDC using SHDB there are a lot of statements like this that are added in but are not needed for the BDC to work. 
    Another example is the "BDC_SUBSCR" field name - this does not in most cases appear to have any effect on how the BDC is processed.
    Also, the recording will include fields which have default values on the screen that you do not need to overwrite with the same value from the BDC.
    I often delete these statements from the recording, taking care that I understand what the impact is.  You can try commenting out the line and see what difference it makes to processing. 
    When using a BDC for updating a lot of records, having less of these types of lines in the BDCDATA table will speed performance a bit.
    Andrew

  • Question about Java programming development

    There are five phases in java program development. They are: edit -> compile -> load -> verify -> execute
    However, every time I develops program. I only experience phase 1, phase 2 and phase 5. I always miss phase 3 and 4. When do the class loader and bytecode verifier work? How do they work?
    Second question, how the legitimate programs can execute automatically without typing command java to invoke the interpreter?

    lighthero wrote:
    I still have some questions.
    1. I want to run the program just like the commercial software such as Adobe and MS Office.(just double click to run the program.) How do I execute a java program without typing command java every time?Create an executable JAR: [http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]
    >
    2. How does the JIT compiler work?[http://www.google.ca/search?q=Java+JIT]

  • Question about installing programs on macbook pro

    For example I downloaded adobe installer from the net, and the installer file can be found at the finder. Once
    I completely
    Download and install adobe, can i delete the installer at
    The finder?

    Can i ask another question?  What if i want to uninstall the program itself? For example, i found it a waste of memory anymore. Is dragging the application icon to the trash enough?

  • A question about thread programming ...

    Is it possible to modify the following program such that the output is
    ABCABCABC ...
    I tried yield, but not getting results on every run.
    The program is:
    public class Example1 {
    public static void main(String[] args) {
    MyThread t1 = new MyThread("A");
    MyThread t2 = new MyThread("B");
    MyThread t3 = new MyThread("C");
    t1.start();
    t2.start();
    t3.start();
    class MyThread extends Thread {
    private String message = "Hallo!";
    public MyThread() {}
    public MyThread(String s) {message = s;}
    public void run() {
    for (int i = 1; i <= 5; i++) {
    System.out.print(message);
    }

    Not really, no. It's possible (not using yield) to force threads to run in a particular order, but it's kind of missing the point of using threads in the first place!
    Yield is there purely to allow other threads the opportunity to run. It makes no guarantee about which thread will run next.
    If you really must, you need to use a wait() call to force the thread to block, notifyAll calls to resurrect them, and some commonly accessed resource that allows each thread in turn to determine IF it is its turn to run when it is awakened by the notifyAll call. That seems to be the closest to the spirit of what you're trying to do.
    It's a lot of work for something that you can more simply achieve by having only one thread of execution in the first place!

  • Strategic question about J2ME program

    I'm quite new to J2ME and am just working through trying to get a small program working between two phones - they communicate fine but I seem to be stuck more on a conceptual overview of some things I don't quite understand yet. Mainly because event driven seems to not sit well with me yet I don't think.
    I have 2 phones and I have them basically enter an insult to each other in challenge before they move into a series of rounds (small game). They do this part fine. What does happen though is the moment the insult is sent from phone A then it goes directly to the next display on phone A- and the same with phone B. The messages are sent but they both need to be able to view each other's insult / challenge before moving to the next displayable.
    I'm really just wondering in general terms how I go about creating stages where each phone has to complete something - a round in a game for example. I know it sounds kind of dumb but I'm just looking for some advice.

    http://www.jcp.org/aboutJava/communityprocess/final/jsr082/
    found this :) I think it's the answer to my problems.

  • Question about GenIL programming for CRM 7.0

    Hi All, I am confused in GenIL programming in CRM 7.0, pls help.
    1 Why there are 2 methods related to object method execution u201CIF_GENIL_APPL_INTLAYEXECUTE_OBJECT_METHODu201D and u201CIF_GENIL_APPL_INTLAYEXECUTE_OBJECT_METHOD2u201D, as I debugged, the former one will be called whatever the return type is Object or DDIC and I don't know how "EXECUTE_OBJECT_METHOD2" could be called.
    2 whatu2019s the usage of Object with Type u201CSearch Result Objectsu201D? I see it could combine data into result. But how to use it? Is there any sample for it?
    3 whatu2019s the usage of Object with Type u201CView Objectsu201D? Is there any sample for that?
    4 the best practice of using u201CIF_GENIL_APPL_INTLAYON_AFTER_COMMITu201D and u201CIF_GENIL_APPL_INTLAYON_AFTER_ROLLBACKu201D? whatu2019s the general purpose of those two methods? in it, what should I do and what should not do? 
    Thanks.

    Hi Richard,
    I am going to try and tackle all four at once. The answers are not complete clarifications, but should give you a good start. I am not logged into a system to check everything right now.
    1.
    As far as I recall the two methods differ in ther signature. METHOD() will only allow you to pass flat values and recieve flat values whereas METHOD2() gives you the ability to at least recieve references to objects and data.
    2.
    Your assumption is right. Result objects are exactly for the purpose to combine data of different areas into one handy object in a result list. The are create on the fly. Meaning there is no implementation class. Just specify them in your BOL dynamic query as resu lt object and fill the structure accordingly. It is just a nice thing to have on the UI. Logic for data fetching is combined in one central place. Can be reused everywhere
    3.
    Same as 2.. From my experience you can include view objects in the model hierarchy. For instance when fetching data from a remote destination and just displaying it on the UI.
    4.
    Looks to me like methods for implementing your own GenIL component and/or Root Object. In these two cases you would want to get information about the BOL transaction context. Cleanup your stuff or initialize. Have a look at the BP component. It is rather cleanly implemented. BT tends to be a little bit cetralized around CRM_ORDER_MAINTAIN.
    Hope it helps. I held  trainings concerning those topics and it is a topic I could go on about for at least an hour. BOL and GenIL are badly documented and there are many pitfalls.
    cheers Carsten

  • Questions about the Program "Renamer4Mac" (file renamer program)

    Does anyone use this program? Or does anyone know of a good program that can be used to rename a large group of files?
    I have been trying to use this program to get rid of all the ",jpg" and ".doc" and ".ppt" etc, on my files. However, when I use the program, not only does it rename the files, by removing the suffix in the file name, it also changes the files to "Unix Executable Files". I don't want to change the file type, just the name. Is there anyway I can do this....with this program or some other one??
    Thanks!

    I wouldn't fiddle with globally changing or deleting file extensions. They are part of OS X's unfortunately convoluted concept of metadata, which is an attempt to join together several different systems - filename extensions (DOS-style), resource fork metadata (Mac OS), file type headers (Unix).

  • I have a question about a program I'm trying to run on a macmini.

    This program is called protomuck. It is a MU* server program.
    I'm not having any luck bringing up the MU* window in Savitar ( a mac based MU* client)
    I'm using localhost as an addy. (Because I don't have a server) and don't plan to fiddle around with that until later, anyways I'm trying to get this MU* running on my system so it can be transfered easily later on.
    Has anyone a clue what the default port I should use is?.
    And then if I get something...what I log in as ?
    I got the default password on the program, so that's all set.
    Do I connect one or #1?
    Do I use the command connect or the command CH?
    And finally if someone could recomond more or other MU* server programs, this would be nice too.

    For some reason I do not see your attached image full size I only see the thumbnail.
    * The image “https://support.cdn.mozilla.net/media/uploads/images/2015-02-10-21-47-26-659c35.png” cannot be displayed, because it contains errors."
    Not sure if that is a cdn server issue or a forum bug. I can not make out the names of the add-ons
    I also note you do not mention your Website address on your profile, and although that is not a place for out right advertising you will be permitted to add a link for a website you own or develop.
    The addons.mozilla page of each specific addon is probably a good place to check for licence details. You could create your own ''collection'' on addons.mozilla and link to that.
    *See https://addons.mozilla.org/faq That mentions licensing and collections.
    There are changes coming up on the process for installing extensions
    * https://blog.mozilla.org/addons/2015/02/10/extension-signing-safer-experience/
    That probably will not affect your plans, but I thought I would mention it.

  • Question about Java Program

    I have a question here that I cant seem to figure out.
    I would really appreciate it if someone would help me out with the answer. I just got started learning Java and have a question:
    Suppose list is an array of five components of the type int. What is stored in list after the following Java code executes?
    for(int index = 0; index < 5; index++)
    list(index) = 2 * index + 5;
    if(index % 2 ==0)
    list[index] = list[index] -3;
    I would really appreiciate it if someone could help me out with this problem.

    This doesn't seem like a JSC-related problem, but I'll answer it anyways...
    list(index) = 2 * index + 5;This should probably be list[index] = 2 * index + 5
    The array will, after execution, contain
    {2, 7, 6, 11, 10}

  • Question about DNS programing

    hi, i am creating a DNS query message,
    but when i send out my package, in wirshark i capture that in my package the question is unknow
    my package carry a domain name like "www.sun.com"
    and send to one of the root dns using type a.
    but the question is that,
    i have to convert the "www.sun.com" into byte array
    what i did is "www.sun.com".byteValue,
    and directly put it into the question part of my dns query.
    seems this part causing the problem, i can not directly convert the string into byte,
    have to follow some rule
    Does anyone know how to do that?

    en.....becuase i want to wirte some code like getbyName does..hoho
    i find out finially
    03www03sun03com
    because
    length of www is three, so there is a "3" infornt

Maybe you are looking for