BADI  CRM_ISA_BASKET_ITEMS - Does it work if the GUID is not yet available?

We have successfully implemented method CHANGEITEMS_BEFORE_ORDER in BADI CRM_ISA_BASKET_ITEMS.
It may happen that we miss the guid (REF_GUID) in input structure IT_EXTENSION but field NAME and field VALUE do already have a content. This situation does appear if a "new" line has been entered in the basket. Is it also possible to handle this situation or do we need in all cases the guid of the position in input structure IT_EXTENSION in order to be able to fill ct_input_fields and ct_orderadm_i in the right way.
If this is possible, can anybody please add a coding example.
Thanks and regards
Michael
Can anybody help?

Hi Micheal,
If you are not getting the ref_guid in your situation, you can use CHANGEITEMS_SET_DATA and get the item guid from crmd_orderadm_i and can pass as the reference to your items. But for this method you need to call crm_order_maintain explicitly and pass the data to it. Please find the below code:
loop at it_extension into li_extension where name = 'XYZ'.
    append li_extension to lt_extension.
    ENDLOOP.
  loop at lt_extension into wa_extension where NAME = 'XYZ'.
  if wa_extension-value is not initial.
     read table it_orderadm_i
     into wa_orderadm_i
     INDEX sy-tabix.
wa_text-ref_guid   = wa_orderadm_i-guid.
  wa_text-REF_KIND   = 'B'.
  wa_text-TDID       = 'ZYSI'.
  wa_text-TDSPRAS    = 'E'.
  wa_text-TDSTYLE    = 'SYSTEM'.
  wa_text-TDFORM     = 'SYSTEM'.
  wa_lines-tdline = wa_extension-value.
  wa_lines-TDFORMAT  = '*'.
  APPEND wa_lines TO ls_lines.
  wa_text-lines = ls_lines.
  wa_text-MODE  = 'A'.
  INSERT wa_text INTO TABLE ls_text.
  CLEAR wa_text.
  CLEAR wa_lines.
  CLEAR ls_lines.
  l_header_guid = wa_extension-ref_guid.
  CONCATENATE 'CRM_ORDERI' l_header_guid into lv_logical_key.
  wa_input_fields-ref_guid   = wa_orderadm_i-guid.
  wa_input_fields-ref_kind   = 'B'.
  wa_input_fields-objectname = 'TEXTS'.
  wa_input_fields-logical_key = lv_logical_key.
  wa_field_names-fieldname = 'LINES'.
  APPEND wa_field_names TO lt_field_names.
  wa_input_fields-field_names = lt_field_names.
  APPEND wa_input_fields TO lt_input_fields.
*  append wa_input_fields to it_input_fields.
clear wa_field_names.
clear lt_field_names.
clear wa_input_fields.
endif.
endloop.
  CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
     IT_TEXT                       = ls_text
      CT_INPUT_FIELDS               = lt_input_fields
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
endif.
endmethod.
But remember, if you set the extension data in the java class correctly, you will get the ref_guids also filled in almost all the times.
Regards,
Lakshman.

Similar Messages

  • There is an error in cached information for id ************** The content is not yet available to download.

    What does that actually mean?
    Plain bundle (a single file copy + launch executable)
    But it does not run on a client to which it is assigned
    Seb

    Could be the content did not upload properly...........
    On 1/10/2014 9:26 AM, Sebastian Cerazy wrote:
    > Guys, I have a SINGLE server
    >
    > Seb
    >
    > "kjhurni" <[email protected]> wrote in message
    > news:[email protected]...
    >>
    >> Sebastian Cerazy;2298104 Wrote:
    >>> What does that actually mean?
    >>>
    >>> Plain bundle (a single file copy + launch executable)
    >>>
    >>> But it does not run on a client to which it is assigned
    >>>
    >>> Seb
    >>
    >> I've seen it happen in 3 scenarios. Regardless, the 3 scenarios have
    >> something in common:
    >> You need to examine what the CONTENT SERVER(s) are that are assigned to
    >> the agent/location in question.
    >>
    >> If there's only ONE content server assigned, it makes troubleshooting
    >> easier.
    >>
    >> Here's the 3 instances where I've seen this for non-ZPM Bundles:
    >>
    >> 1) The Bundle replication has not yet started or finished. For
    >> example, we have our Primary servers set to replicate every 1 hour, and
    >> our satellites replicate every night starting at 8:00 p.m.
    >>
    >> 2) The Bundle replication THINKS it has finished (shows in the ZCC that
    >> it's replicated) but the files aren't there on the server, or aren't
    >> there CORRECTLY. On a Satellite server, you can use:
    >> zac cvc
    >> to verify the content
    >> and sometimes I've had to use:
    >> zac cchk
    >>
    >> 3) The agent is pointed to a satellite server for Content, and the
    >> xplat agent (Linux) has crashed or not running (there's a bug for this
    >> currently in 11.2.4 and lower), and, as a result, the agent cannot
    >> connect to the Sat. Content server to fetch the content.
    >>
    >> --Kevin
    >>
    >>
    >> --
    >> The opinions expressed are my own.
    >> Check out my OES2 Guides:
    >> Installing OES2 SP2:
    >> http://www.novell.com/communities/no...allation-guide
    >> Upgrading to OES2 with ID Transfer:
    >> http://www.novell.com/communities/no...r-id-scenarios
    >> GroupWise Migration with OES2 ID Transfer:
    >> http://www.novell.com/communities/no...p2-transfer-id
    >> ------------------------------------------------------------------------
    >> kjhurni's Profile: https://forums.novell.com/member.php?userid=734
    >> View this thread: https://forums.novell.com/showthread.php?t=473471
    >>
    >
    >

  • Why is the iPhone 5 available in the shops but, not yet available through apple online?

    A Friend of mine has just managed to collect an iPhone 5 at a local phone shop in town. I've pre ordered mine and was informed I won't receive it for two weeks from the apple site.
    why is this the case, and we have been avid apple fans for many years, that a friend who's never owned an apple product eligible to pick one of the shelf, and I have to wait?

    Thanks for your reply but, sadly the phone was purchased through a non apple store. I'm annoyed apple emailed me asking me to pre order the iPhone 5 and then told to wait while everyone else is getting them freely in the high street stores.

  • Why does wireless work for one laptop and not the other?

    I have two laptops:
    1) MacBook: 10.4.8, Airport Exteme (Firmware 1.0.46)
    2) G4: 10.3.9, Airport Extreme (405.1 (3.90.0.p18)
    I have the two machines sitting right next to each other in my apartment. Machine #1 has full wireless signal strength. Machine #2 barely has any wireless signal. Neither is running Interference Robustness. Any ideas why one would work and the other would not, or suggestions as to how to debug this problem?
    I have tried stopping and restarting the Airport Extreme card on machine #2. I have also tried power cycling machine #2. This does not fix the problem.
    A little more history: for a long time I was having problems with machine #2 dropping the wireless connection. As part of trying to work around these problems I turned on Interference Robustness on machine #2. This fixed the dropping signal problem, but left me with weak signal strength. I shut off Interference Robustnes but ever since then the signal has still been weak on machine #2.
    Mac Mini Duo 1.66 GHz, 2 GB   Mac OS X (10.4.6)  

    The base station uses a single channel which all clients must use to connect.
    Have you checked the antenna connection into the card? Many people are surprised about how far the wire is actually supposed to be pushed into the card. Compare the connection with the photos in KB 108039, Properly attaching the antenna on an AirPort Extreme Card.

  • HTMLResources, does this work in the adobe content viewer on the iPad

    HTMLResources, does this work in the adobe content viewer. I have created my HTMLResources folder with the pdf and zipped it. It how ever does not download anything when I press the button in the content viewer.

    Hi Bob, I just did my test again. What I didn't do in the first place was zip the contents, not the folder. It worked, thank you very much. My next question is can these pdfs be saved into ibooks? Can we download content such as forms that can be filled in and then eamiled back via the ipad mail program?

  • I wanted to send a push notification, unfortunately it does not work. The page will not load. Anyone know why?

    I wanted to send a push notification, unfortunately it does not work. The page will not load. Anyone know why?

    Push notifications, I believe, is only for iOS.
    If it is for iOS, take a look at Using Apple push notifications with Digital Publishing Suite | Adobe Developer Connection

  • Can we copy a CD tutorial onto an iPad? Does it work like the MacBook Air when downloading or copying using the iMac?

    Can we copy a CD tutorial onto an iPad? Does it work like the MacBook Air when downloading or copying using the iMac?

    So it can be .mp4 format.
    If not you have to convert it.
    Try import it into iTunes then sync it to your iPad.
    Message was edited by: ckuan
    Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format

  • Does siri work on the new IPAD in the UK

    Does SIRI work with the new IPAD in the UK

    But only if you have a 'new' iPad (aka iPad3)!
    Check the iOS6 details regarding supported features..... 

  • Does SIRI work on the ipad?

    Does SIRI work on the ipad?

    Siri WILL work on "The New iPad" and it will have many of the new features in iOS 6. The iPhone 4S gets more features, but still the iPad 3 will get a healthy chunk. Unfortunately, users like me on my iPad 2, and other people on iPad 1 (who doesn't even get IOS 6) and iPhone 4, 3GS, iPod 4th Gen, don't Get Siri AT ALL and probably won't get it (fingers crossed though!
    Hope this helps, if not, messag me back!

  • Does airplay mirror only work with the ipad2 and not ipad1

    does airplay mirror only work with the ipad2 and not ipad1

    But can it still stream video wirelessly?
    For example, with the Digital AV Adapter I can watch video on my TV, but obviously it's wired.
    I'd like a wireless option.

  • Does windows work on the imac

    I'm interested in purchasing a notebook; my question is does windows work on the mac noyebooks?

    Yes. http://www.apple.com/support/bootcamp/
    And visit the Boot Camp forum https://discussions.apple.com/community/windows_software/boot_camp.
    Alternatively you can also install Windows using a virtual machine like Parallels, Fusion, or VirtualBox.

  • Does 3d work on the netflix app via appletv?

    Does 3d work on the netflix app via appletv?

    What is an itube app?
    If it is something available in the iTunes store, ask the app developer.

  • HT204394 Does iCloud work on the iPad mini

    Does iCloud work on the iPad mini

    Welcome to the Apple Community.
    W100dy wrote:
    Does iCloud work on the iPad mini
    Yep.

  • HT204389 DOES SIRI WORK IN THE UK?

    Does Siri work in the UK? If I ask it to find an Italian restaurant it says it can only do so in the united states using united states english?
    Please advise?

    The link I posted is from the UK site. They would not be advertising features (such as Restaurant lookups) that won't work in the UK (Apple have got into trouble for doing that before).
    At the bottom of the page it states:
    More languages. More countries.
    Siri now understands more languages and is optimised for more countries and regions around the world:
    English
    That's the UK flag they've used there...

  • TS4079 Does siri work in the uk

    Does siri work in the uk

    not very well is the answer to your question. Its fien for basic stuff but you cant search for business yet. Apple should have made this clearer in their marketing info.
    Aparently this Autum, it will be being upgraded, but yes its been a frustrating wait to get a feature you have already paid for almost a year later!

Maybe you are looking for

  • How to get table in web templates

    Hi all, how can i capture table in the web template using javascript.. any help on this is very helpful to me. please help. Thanks in advance Kiran

  • Confuse on "Clean" tag on the songs

    Hello everyone. What I understand about the "Clean" tag is that it is safe to listen to even for kids; no offensive or cussing in the lyrics. Am I correct on the use of that tag? I am confuse on the tag "Clean" on the songs I have on my music library

  • Data exist in PA0008 and not in Employee (Attributes) 0EMPLOYEE_ATTR

    I am using standard reports from the cube 0PA_C01 (Headcount with personnel actions) but i am experiencing some data are not coming in the master data 0EMPLOYEE_ATTR specially these fields Pay scale type Pay scale area Pay scale group Pay scale level

  • Elements 5

    I recently started using a Canon 50D digital SLR and for whatever reason, Elements 5 won't read my CR2 files. Tells me it can't open due to them being the wrong type of file. Need help in figuring out what I'm doing wrong or if it's the program or th

  • Persisting the post data while handling errors in STRUTS

    hi, Let me explain my situation. I have an updation form.On click of the update button I am doing some validations in my Action class.In case of any error it will redirect back to the input page. Now comes my problem.As I have told you,my form is an