REMOVED_FROM_STAGE called on creation
I have a class called MyClass which needs to detect when it is ADDED and REMOVED from stage so i can remove event listeners and set variables to null when MC is removed for GC optimizations.
My working document is: as3, fp 10 and have tried it with and without strictmode
This is my class:
public class MyClass extends MovieClip {
public function MyClass() {
addEventListener(Event.ADDED_TO_STAGE, onAdded, false,0,true);
private function onAdded(event:Event):void {
event.target.removeEventListener(event.type, onAdded);
trace("added " + this.name);
addEventListener(Event.REMOVED_FROM_STAGE, onRemoved, false,0,true);
//add listeners here
private function onRemoved(event:Event):void {
event.target.removeEventListener(event.type, onRemoved);
trace("removed " + this.name);
//remove listeners here for GC
I linked a MovieClip from my library to this class and put it on the stage manually in the IDE. When i run it i get these traces: "added", "removed"
So just after adding it to the stage it dispatches removed_from_stage event while it actually doesn't remove the object.
A workaround for this would be replacing Event.ADDED_TO_STAGE with Event.RENDER, because RENDER get's fired After ADDED, but i'm working on a public API and i don't think that's best practice
Note: if i create a new document and just copy and paste the MC from my working document to the new document, it works as expected. But as i said, this is a public API, so i can't tell people to create new documents when it fails...
So my questions are:
why is this happening? is it a bug?
how can we solve this?
is replacing ADDED_TO_STAGE with RENDER bad practice?
The FlipViewTransition effect does some reparenting internally to accomplish the 3D effect. As a result you receive multiple add and remove events. To work around this, I would recommend using FlexEvent.ADD and FlexEvent.REMOVE instead of addedToStage. You can also try using ViewNavigatorEvent.REMOVING.
Chiedo
Similar Messages
-
Asynchronous SUBMIT or CALL WITH creation of NEW SESSION
I'm doing monotonous comparisons between systems, but I do need to see the SAP standard comparison for each. So I have an ALV list that I'd like to double click a line entry that will spawn 3 NEW SESSIONS and I'll automatically populate the parameters.
So, has anyone been able to SUBMIT or CALL WITH THE KEY BEING THAT IT MUST CREATE 3 NEW ASYNCHRONOUS SESSIONS. I'd be grateful if you'd share your experience in this regard. Thank you, AdrianHi,
You can try in this way.
Create a new FM and place your code there. Call this FM using addition STARTING NEW TASK. It should work fine.
Check out F1 help on CALL FUNCTION for more details and additions.
Thanks,
Vinod. -
PO creation through third system
Hi Friends,
We have one process wherein PO is created in thirdparty system & that is being created in SAP through RFC call. Middleware used is Biztalk.
Now we have new third party system ( BOL) which need to do same job of PO creation. I want to know how process flows while integrating third party system to SAP .What are the details I will require from tool BOL etc. Is there any standard process which I can follow to get this done.
Thanks,
KiranKiran,
For a PO to be created you need to have the following data
Document type,Comp code, Purch Org, Purch Grp, Material code, Qty, UOM, Net price, Additional charges if any, delivery date.
Please create a Custom Table with the above fields in your SAP system. you need to obtain the above data from your third party system through your middle ware system Biz Talk, and store the data in respective fields Please include date and time in the Custom table as fields.
Create a separate program in SAP system with Date and Time as selection fields.
The program should call PO creation BAPI and create a PO in SAP system.
You need to discuss and decide on the timings of the Interface and run the program as a Background Job to create PO in SAP system.
Hope this helps you.
Raghavan -
Accounting Document Creation in FB60 with Tax Calculation Enable
Hello everyone,
I am currently facing a strange issue. The issue is that I am using transaction FB60 to create an accounting document.
How I proceed with:
1. Go to FB60
2. Enter the necessary details
3. Click on the "Save" button to post the document.
To view the accounting document created,
1. Go to FB03
2. Enter the document number generated previously to view the document.
The problem is that, currently I need to update a field in the accounting document during its creation. I know that the BaDi 'AC_DOCUMENT' is called before creation of any accounting document.
I have hardcoded a break point in the BADI to test whether when clicking on the button 'SAVE' from transaction FB60, whether the BADI 'AC_DOCUMENT'is called, and the debugger was not trigger.
I don't understand why the BADI 'AC_DOCUMENT'is not trigger, i did activate the 'Update debugger' to test whether the BADI was executed in the background but in vain, the BADI 'AC_DOCUMENT' was not triggered.
But if I click on 'PARK'(I don't know a park document is document in transaction FB60, the BADI 'AC_DOCUMENT' is trigger.
I would be grateful if someone gives me an idea or a small explanation on what is going on in the back.
Maybe, I am wrong with the BADI 'AC_DOCUMENT', maybe this BADI's is not trigger every time an accounting document is created.
Thanks a lot in advance.
Kind Regards,
Bryanwhat field do you want to update? did you try FI substitution?
-
Role Creation in CUP 5.3
Hello,
I'm trying to understand the concept of what is called "role creation" in Compliant User Provisioning.
My understanding is that the "create role" option in CUP (configuration>Roles>Create Role) means simply adding the "attributes" such as a business process, functional area, system, or company, to the SAP roles that you imported into CUP.
It seems that, with CUP, once you have imported SAP roles and "adjusted" them (adding attributes), you are no longer operating PFCG and SU01 in the SAP backend system. From this point on, everything is done in CUP (provisioning) and ERM (creating additional roles).
Please tell me if I'm wrong.
HMHM,
The create role option in CUP is mainly for legacy/non-cup supported systems. This way you can follow the standard workflow process for LDAP/Windows/legacy system. In this user provisioning and role assignment will not be done through CUP and will be manual. This is very important for some companies as they want user to go through same process if they want to get access to any system and not only ERP system.
The below statement is wrong.
It seems that, with CUP, once you have imported SAP roles and "adjusted" them (adding attributes), you are no longer operating PFCG and SU01 in the SAP backend system. From this point on, everything is done in CUP (provisioning) and ERM (creating additional roles).
If you don't have ERM then you will have to use PFCG. Once you have CUP, you don't have to use SU01.
Regards,
Alpesh -
Immediate Delivery Creation on Sales Order Save
Hi,
For one my scenario I want delivery to be created immediately after saving the sales order.
For which i have set the immediate delivery'X' in the sales document type. But when i create the sales order, which is confirmed for today, delivery is not immediately created.
Let me know what could be the possible reason for this and is there any other place i need to make additional settings?
ThanksHi there,
I guess that materials will be maintained in separate storage loc to process immediate delivery scenarios in your company sothat item is confirmed for today.
When immediate delivery is not happening, thenit means that the system is not calling the delivery creation prog immediately after order save.
So in sales order prog MV45AFZZ put a code that if the order has to create immediate delivery (like rush orders SO, cash sale BV), system should check if the material is confirmed for today. If yes, it should call delivery creation prog SAPMV50A
Regards,
Sivanand -
How to create a new creation page from view page itself
Dear all
i have view page in that i need to click on new button i need to call new creation page
here i am writing the code in view page co in pfr
HashMap h1 = new HashMap();
h1.put("pmode", "Continue");
if (pageContext.getParameter("New") != null)
pageContext.setForceForwardURL("OA.jsp?page=/crm/oracle/apps/xxcrm/crmmgmt/quotationmgmt/webui/xxcrmquotationcreationPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null, h1, false, OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAWebBeanConstants.IGNORE_MESSAGES);
in creation co i am calling this method
if (pmode!=null)
System.out.println("Entered into this block.....");
am.xxcreatequotation(orgid);//blank record for this
System.out.println("After this statement......");
cancel1.setRendered(false);
System.out.println("After this statement......11");
in view page when i am clicking the new button the page is calling editable mode
i dont think so y it is happening like this.
Regards
SreekanthDear Gaurav
i wrote this code
public void xxcreatequotation(int orgid)
xxcrmOpportunityTVOImpl vo = getxxcrmOpportunityTVO();
OADBTransaction tr = getOADBTransaction();
int x = 0;
String lv_current_flag = "Y";
String lv_opt_flag = "N";
if (vo.getFetchedRowCount() == 0)
vo.setMaxFetchSize(0);
Row createqtn = vo.createRow();
vo.insertRow(createqtn);
createqtn.setNewRowState(Row.STATUS_INITIALIZED);
Number qtnid = tr.getSequenceValue("xxcrm_opportunity_seq");
System.out.println("The opportunity id is....." + qtnid);
vo.getCurrentRow().setAttribute("OppoOpportunityid", qtnid);
vo.getCurrentRow().setAttribute("OrgId", orgid);
vo.getCurrentRow().setAttribute("OppoRevisionId", x);
vo.getCurrentRow().setAttribute("OppoCurrentFlag", lv_current_flag);
vo.getCurrentRow().setAttribute("OppoIsoptional", lv_opt_flag);
vo.getCurrentRow().setAttribute("OppoBaseOpportunityid", qtnid);
Regards
Sreekanth -
Problem integrating Call-list's call results
Dear SAP experts,
I recently integrated the Call-list and wanted to take it to the next level. I have the call-list, calls, and assignments all set up, along with synchronized connection between the call and it's corresponding Business Transcation.
I was able to find the SPRO path towards defining call results/rescheduling reasons, but was unable to integrate it in my business procedure.
A little background:
I have predefined call-lists defined. I inject calls into them via ABAP coding (triggered by HTTP from my external CTI System).
For instance, every time a "callback" request occurs in the CTI system, it reaches out to SAP CRM by HTTP request and triggers a call creation and transaction creation. The Agent assigned to the call-list then identifies + makes the call directly from the call list.
I am not sure what should happen next... Where do the call results come into play?
Is he required to navigate to the relevant BT (via call list) and record the changes there? or can he record call results directly from the telephony toolbar?
Any guidance on the subject would be highly appreciate!!!
Thanks in advance,
Alon Chanoch
SAP CRM IC: Call-list creation.Not a setting but a bug that occurs on many Nokia phones, including my N82 with V31 on it. i suggest you try a software update and if that doesn't solve then I don't think there's much we can do about it.
It doesn't bother me so when I see a thread about it I just move along. Do a search on this forum, who knows, You might just find something
Show your appreciation. Hit that kudos button real hard -
Calling a procedure/function in forms personalization
Hi,
Can any one please help me in calling a procedure/function from the forms personalization? The requirement is to create an attachment when ever a new order line is created in R12. So for this, I created a procedure which calls attachment creation API. And in the forms personalization, I am doing the following.
Trigger Event: WHEN-VALIDATE-RECORD
Trigger Object: LINE
Condition: :LINE.INVENTORY_ITEM_ID is not null
Action Type: Builtin
Builtin Type: Execute a Procedure
Argument: =xx_test_attachment_new(:LINE.LINE_ID,20,'OE_ORDER_LINES',1,'test123')
This procedure works individually if I call it from TOAD.
Help is really appreciated?
Thanks,
Sri.A question for the Forms ?
Nicolas. -
I have an Audigy 2 ZS Platinum Pro sound card installed in my WindowsXP pc.
I have a Roland RD700SX stage piano and I wish to record my playing on my pc somehow.
This Audigy card has this external box with all kinds of inputs and outputs and I am at a loss on how to connect my piano to this.
My piano has /4" outs as well as XLR outs as well as MIDI . It also has USB which I currently connect to my pc so that I can play some midi files from my pc and they play on the keyboard.
But now I want to record myself and need to know if there is a way using this Audigy card.
Which input would I need to plug into first of all? Can I use the 2 rca in's? My /4" cables that I use to plug into my amp have /4" to rca adaptors. But looking at documentation, the rca's on the back say they're used for analog devices like vcr's and such. My keyboard is a digital keyboard as well as a stereo keyboard (left and right outs).
I don't think I want to use Midi connections do I? I want to record authentic recordings and make them into MP3 format.
Anyways, any advice would be appreciated.
PS: I do have 2 software programs that I'm not sure will help here, Cubasis and Audacity.
Is there any Creative software in this suite that I have that I would utilize?Rockitman3 wrote:
Thanks for the quick reply.
Unfortunately, most of what you said went way over my head.
I have /4" cables from my keyboard and I can plug an RCA adaptor on the other end. Do I plug these cables into the RCA left and rights on the Audigy box?
I do not plan on adding effects, mixing, etc. I just want to simply record my piano playing.
So if I open Cubasis, which SoundBlaster source do I pick, there's about 5 or 6 different ones.
I'm such a noob at this, and the Cubasis program is very hard to understand. Any detailed simple instructions would be appreciated.
There is a guide called "Music Creation Guide" either installed (you should find it under "Documentation on Start--Programs...Creative--Soundblaster--Audigy nn-->" or in hard disk or driver/software CD (which can be found @
- installation path; C:\Program Files\Creative\_your_card_model_\Music Creation Guide\
- path on original installation CD; \Audio\Setup\GuideBk\ (select language)
Drivers:
W/ Cubasis you should see listed something like
ASIO Multimedia (don't use)
ASIO DirectX (don't use)
Creative ASIO -->6-bit/48kHz (OK)
SB Audigy 2 Zs ASIO [nnnn] --> 6-bit/48kHz (OK)
SB Audigy 2 Zs ASIO 24/96 [nnnn] --> 24-bit/96kHz (OK) best quality
You also need to set the project samplerate to 48kHz or 96kHz and recording bit-depth to 6, 24 or 32 (depending on which of above mentioned mode you use).
As the CD and MP3 quality are 6-bit/44.kHz, you need to make a saplerate conversion from 48kHz to 44.kHz and dither from 32/24-bit to 6-bit if recording as 32/24-bit to get your project files exported to Wave or MP3 (many burning software can do these "on the fly"). I don't know the features of Cubasis but you can do this w/ software like Voxengo r8brain (freeware) when your data is still in wave format.
If you plan to record the piano only, just use Craeti've Media Source and record using 6-bit/44.kHz right away into wave or MP3 format (as you wish).
jutapaMessage Edited by jutapa on 09-26-2006 0:4 AM -
Schedule lines tranfer from R/3 to SUS in a MM-SUS scenario
Hi SRM gurus,
We are working on the MM-SUS scenario where the scheduling agreement is created in the backend R/3 system. Delivery schedule lines are generated in the backend and transfered to the SUS thru. ME9E transaction for sending the delivery schedule to the SUS.
We have a confirmation control key which guides us in SUS to create an ASN in the backend.
Though there is a confirmation control key exist in the SA for that particular line item, when the ASN is sent from SUS to XI to R/3. There is an idoc error in the R/3 which says that there is no confirmation control key though it is there for the line item which is transfered to SUS.
Now Pls. answer my questions :
1) Will ME9E transfer the total lines in the SA or the schedule lines with the delivery schedules only ?
2) Is it possible to resend the same schedule line ( with the updated delivery schedule) to the SUS as per the standard scenario?
3) In the SUS how do we findout the materials corresponding to that particular delivery schedule line. Because in SUS the reference is only the scheduling agreement number as we could not see any scheduline line item.
Pls. suggest.
We are working on SRM(SUS) 5.0 with ECC6.0 as the backend.
Best regards,
Sridhar.i have seen the code --> where the FM is called for creation of SAR in SRM.
that is FM
BBP_SAPXML1_SUSPO_CREATE_IN --> in this --> search for this
Call API
IF ls_header-description EQ 'DELINS'.
CALL FUNCTION 'BBP_API_SUSPO_CRT'
EXPORTING
is_header = ls_header
it_item = lt_item
it_attach = lt_attach
it_partner = lt_partner
it_longtext = lt_longtext
it_tax = lt_tax
it_limit = lt_limit
it_sdln = lt_sdln
IMPORTING
es_header = ls_header_e
this one creates ---> the SAR in SRM.
and also i have seen further --> there is no place where any BADI is also called.
i am afraid it is not possible to control what you want using BADI.
only --> difference between --> New document and the old document is
the Indicator --> C for create
U for update.
And Also if you can see the XML message for the updated document --> you can see all the lines in the XML message.
Not the added lines... -
How to Release the order while creating an order?
Hi
My requirement is to create an order and release(REL) it immediately upon creation.I have created an RFC FM wherein which I am calling the Bapi 'BAPI_ALM_ORDER_MAINTAIN' to create an order.
Following method I have tried to release the order, but still my purpose not resolved completely.
Creted the 'RELEASE' method in the BAPI call upon creation of order, but it throws a BAPI error.
I tried with FM 'STATUS_CHANGE_INTERN' in the BADI of an order to release it. It does release the order. But the problem is afer the order is created and released by BAPI & BADI, I could still see the Green Flag(Release) in 'Iw 32' though system status changed to 'REL' Status. on Top of it , I could still observe the Creted Status(CRTD) system status in the order. Actually once the order is Release(REL), created status(CRTD) should not be displayed .
What would be the best approach to acheive the result?.Appreciate your valuable reply on this regards.
Regards
sri-Hi,
Try this..
Create a new RFC function module in SE37 with the same parameters as the FM ALM_ME_ORDER_RELEASE
In the attributes of the new FM set the radio button "REMOTE ENABLED"
Then call the FM ALM_ME_ORDER_RELEASE inside your new FM..
Generate ..
Then call this new FM in your user exit...with IN BACKGROUND TASK.
CALL FUNCTION 'Z_ALM_ORDER_RELEASE'
IN BACKGROUND TASK.
Hope this works..
Thanks,
Naren -
BP replication from CRM to R/3 (ECC)
Hi all,
I have a question regarding BP replication from CRM to R/3.
In transaction PIDE I can only set up one combination of classification B (Customer) and account group, e.g. Z001 for Sold to partner.
What could I do if I need to replicate a Bill-to partner role from CRM to R/3 and the Bill-to partner account group in R/3 is not Z001?
Thanks a lot!
BR,
//AndersHi Anders,
While transfering business partner from CRM to R/3 the system only looks at classification and identifies the Account Group form PIDE settings.
For the roles Sold-to, Bill-to, Payer, Ship-to, Classification Customer is Picked Up and hence all of them will be mapped to the same account group.
May be u can try to change the classification of Bill-to Role to something else, and map that to the other account group.
OR
Try to use a middleware exit or BADI which gets called before creation of a customer master in R/3, wherein u can put a code for picking up a different account group.
Wish this helps.
Regards,
Shalini Chauhan -
ERP Sales Order : Performance issues with Product Proposal
Hi
we are working on CRM 2007 solution and are facing serious performance issues with the ERP Sales Order functionality provided in the ICWC of this version.
In our development we are adding items in the ERP cart as soon as the user clicks on the 'New Sales Order' button of the sales order sreen. We get the items by very simple and optimized call to the ERP system and then add these entities in the Item Cart (Item collection ...in simple sense).
For adding 10 items the application takes 10 seconds and this is too much for adding just 10 items.
Can you please provide any Notes/alternative solution to resolve this issue.
Regards
AjitabhHi Ajithabh,
Please apply the following SAP notes:
1061423 - Interaction Center ERP Order Performance improvement
1262277 - Performance: CRM value help causes dumps in ERP
1292817 - Performance: Reduce RFC calls during creation of ERP order.
1319885 - ERP sales order search with external reference
1326527 - Reducing number of RFC calls in IC ERP Sales Order
I hope it helps!
Regards,
Gabriel Santana -
Hai Experts,
i have problem with table control in bdc, can any tell me wat exact code for table control in bdc,n plz give flat file for this prm or any related
HANDLING TABLE CONTROL IN BDC
DATA : BEGIN OF IT_DUMMY OCCURS 0,
DUMMY(100) TYPE C,
END OF IT_DUMMY.
DATA : BEGIN OF IT_XK01 OCCURS 0,
LIFNR(10) TYPE C,
BUKRS(4) TYPE C,
EKORG(4) TYPE C,
KTOKK(4) TYPE C,
NAME1(30) TYPE C,
SORTL(10) TYPE C,
LAND1(3) TYPE C,
SPRAS(2) TYPE C,
AKONT(6) TYPE C,
FDGRV(2) TYPE C,
WAERS(3) TYPE C,
END OF IT_XK01,
BEGIN OF IT_BANK OCCURS 0,
BANKS(3) TYPE C,
BANKL(10) TYPE C,
BANKN(10) TYPE C,
KOINH(30) TYPE C,
LIFNR(10) TYPE C,
END OF IT_BANK.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = 'C:\VENDOR.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = IT_DUMMY.
LOOP AT IT_DUMMY.
IF IT_DUMMY-DUMMY+0(2) = '11'.
IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
APPEND IT_XK01.
ELSE.
IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
APPEND IT_BANK.
ENDIF.
ENDLOOP.
LOOP AT IT_XK01.
REFRESH IT_BDCDATA.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-REF_LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
IT_XK01-LIFNR.
perform bdc_field using 'RF02K-BUKRS'
IT_XK01-BUKRS.
perform bdc_field using 'RF02K-EKORG'
IT_XK01-EKORG.
perform bdc_field using 'RF02K-KTOKK'
IT_XK01-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-TELX1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
IT_XK01-NAME1.
perform bdc_field using 'LFA1-SORTL'
IT_XK01-SORTL.
perform bdc_field using 'LFA1-LAND1'
IT_XK01-LAND1.
perform bdc_field using 'LFA1-SPRAS'
IT_XK01-SPRAS.
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-KOINH(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
DATA : FNAM(20) TYPE C,
IDX TYPE C.
MOVE 1 TO IDX.
LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKS.
CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKL.
CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKN.
CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-KOINH.
IDX = IDX + 1.
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'
IT_XK01-AKONT.
perform bdc_field using 'LFB1-FDGRV'
IT_XK01-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'
IT_XK01-WAERS.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'WYT3-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'XK01' USING IT_BDCDATA
MODE 'A'
UPDATE 'S'
MESSAGES INTO IT_BDCMSGCOLL.
ENDLOOP.
FORM BDC_DYNPRO USING PROG SCR.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROG.
IT_BDCDATA-DYNPRO = SCR.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORMHi Rajesh,
I will send a sample code 4 ur problem check it once.And also i will attach a FLAT FILE at the end of program check it once.Plz copy the below code and execute it ok...
*& Report YBDC_MB1C_HEADER_ITEM_CALLTRA *
*& DEVELOPER : KIRAN KUMAR.G *
*& PURPOSE : UPLOAD DATA(T.CODE = MB1C) INTO DATABASE(CALL TRANS) *
*& CREATION DT: 5/12/2007 *
*& REQUEST : ERPK900035 *
REPORT YBDC_MB1C_HEADER_ITEM_CALLTRA.
Global BDC And Message Structures
DATA: gt_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE,
gt_msgtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
Global Variables For File Path And Messages
DATA: gv_infile TYPE string, "For Path Selection
gv_msg TYPE string. "For Message Printing
For Elimination Of Illegal Screens
DATA: opt TYPE ctu_params.
Global Variables
DATA: gv_num(2) TYPE n,
gv_matnr(20),
gv_erfmg(20).
gv_num = 1.
Internal Table
DATA: BEGIN OF gt_data OCCURS 0,
f1(20),
f2(20),
f3(20),
f4(20),
f5(20),
f6(20),
f7(20),
f8(20),
f9(20),
END OF gt_data.
Selection Criteria
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_file LIKE rlgrap-filename,
p_mode.
SELECTION-SCREEN : END OF BLOCK b1.
Selection Path
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM selection_path.
START-OF-SELECTION.
opt-nobinpt = 'X'.
opt-defsize = 'X'.
opt-updmode = 'A'.
Upload the data
PERFORM upload_data.
END-OF-SELECTION.
Populate Data Into BDCDATA Structure
PERFORM populate_data.
*& Form selection_path
text
--> p1 text
<-- p2 text
FORM selection_path .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_file.
gv_infile = p_file.
ENDFORM. " selection_path
*& Form upload_data
text
--> p1 text
<-- p2 text
FORM upload_data .
REFRESH : gt_data.
CLEAR : gt_data.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gv_infile
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = gt_data
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
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " upload_data
*& Form Populate_data
text
--> p1 text
<-- p2 text
FORM populate_data .
LOOP AT gt_data.
*Header Information
IF gt_data-f1 = 'H'.
PERFORM firstscreen.
CLEAR gt_data.
ENDIF.
*Item Information
IF gt_data-f1 = 'I'.
PERFORM secondscreen.
*Save data and call the Call Transaction Method
AT END OF f1.
PERFORM save.
CALL TRANSACTION 'MB1C' USING gt_bdcdata MODE p_mode
MESSAGES INTO gt_msgtab.
PERFORM messages.
REFRESH gt_bdcdata.
CLEAR gv_num. "USED IN CONCATENATE STEP
ENDAT.
gv_num = gv_num + 1.
ENDIF. "End of Item Data
ENDLOOP.
ENDFORM. " Populate_data
*& Form firstscreen
text
--> p1 text
<-- p2 text
FORM firstscreen .
PERFORM bdc_dynpro USING 'SAPMM07M' '0400'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MKPF-BKTXT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MKPF-BLDAT'
gt_data-f2.
PERFORM bdc_field USING 'MKPF-BUDAT'
gt_data-f3.
PERFORM bdc_field USING 'MKPF-BKTXT'
gt_data-f4.
PERFORM bdc_field USING 'RM07M-BWARTWA'
gt_data-f5.
PERFORM bdc_field USING 'RM07M-WERKS'
gt_data-f6.
PERFORM bdc_field USING 'RM07M-LGORT'
gt_data-f7.
PERFORM bdc_field USING 'XFULL'
'X'.
PERFORM bdc_field USING 'RM07M-WVERS2'
'X'.
PERFORM bdc_dynpro USING 'SAPMM07M' '0421'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSEG-ERFMG(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
ENDFORM. " firstscreen
*& Form secondscreen
text
--> p1 text
<-- p2 text
FORM secondscreen .
CONCATENATE 'MSEG-MATNR(' gv_num ')' INTO gv_matnr.
CONCATENATE 'MSEG-ERFMG(' gv_num ')' INTO gv_erfmg.
PERFORM bdc_field USING 'MSEGK-KUNNR'
gt_data-f2.
PERFORM bdc_field USING gv_matnr
gt_data-f3.
PERFORM bdc_field USING gv_erfmg
gt_data-f4.
PERFORM bdc_field USING 'DKACB-FMORE'
'X'.
ENDFORM. " secondscreen
*& Form save
text
--> p1 text
<-- p2 text
FORM save .
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
ENDFORM. " save
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR gt_bdcdata.
gt_bdcdata-program = program.
gt_bdcdata-dynpro = dynpro.
gt_bdcdata-dynbegin = 'X'.
APPEND gt_bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
CLEAR gt_bdcdata.
gt_bdcdata-fnam = fnam.
gt_bdcdata-fval = fval.
APPEND gt_bdcdata.
ENDFORM. "BDC_FIELD
*& Form messages
text
--> p1 text
<-- p2 text
FORM messages .
LOOP AT gt_msgtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = sy-langu
no = sy-msgno
v1 = sy-msgv1
v2 = sy-msgv2
v3 = sy-msgv3
v4 = sy-msgv4
IMPORTING
msg = gv_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF sy-tabix EQ 1.
WRITE:/ 'Process Log' COLOR 3.
ENDIF.
WRITE:/ gv_msg.
ENDLOOP.
REFRESH : gt_msgtab.
CLEAR : gt_msgtab.
ENDFORM. " messages
FLAT FILE
*H 10012005 20022005 HEADER 451 1000 0001
*I 1 100-300 5
*I 1 100-400 3
*I 1 100-100 12
*H 12012005 12022005 HEADER 451 1000 0001
*I 2 100-200 4
General Information(t.code= MB1C)
*DOC DATE : 10.1.2005 POSTING DATE : 20.2.2005
*HEADER TEXT : HEADER
*MATERIAL TYPE :451 PLANT : 1000
*STORAGE LOCATION : 0001
*CUSTOMER :1
*MATERIAL NO : 100-300
*QUANTITY : 5
*BUSINESS AREA : 0001
Award points if helpful
Kiran Kumar.G.A
Maybe you are looking for
-
Waiting for Apple to deliver my iTunes match results
It seems to day I'm waiting all day over and over for my iTunes Match reslts... is there a status page somewere?
-
Hi gurus, We want to transport our PI 7.1 SP06 scenarios from DEV to QA. We have taken the following actions: - We've registered our TS in SLD from back-end's Tx. RZ70. - We've created our BS - We've imported the SWC to the ESB. - We want to import t
-
hi all, i am doing the BSP tutorials given on SAP help site..i am on the fourth tutorial(further extending the bookshop application) while creating the <b>basket.htm</b> BSP i get the following error: <b>Field "M_BASKET" is unknown.It is neither in o
-
Getting rtorrent to re-download a previously deleted torrent?
I have watch directories setup, that seem to be working. Now I'd like to download a torrent that I have downloaded before, and then deleted (.torrent and data). Unfortunately, rtorrent knows that it's been downloaded before, and therefore only compla
-
How do I stop a software update of the ipad after it has reached the stage of asking for itunes connection? i didn't sycn my data, and itunes mentioned it will restore the ipad. thanks