Sitemap

Amicuk Programming Answers

BAPI - Change Payment Terms - FI Document

2015-10-11   Views:13

Advertisement

Hi, I need a BAPI to change the payment terms and the payment method supplement of FI documents. I'm trying the Function Module FI_ITEMS_CHANGE, even though I can change the payment block and some other fields with this one, I'm not able to change th

Hi,
I need a BAPI to change the payment terms and the payment method supplement of FI documents. I'm trying the Function Module FI_ITEMS_CHANGE, even though I can change the payment block and some other fields with this one, I'm not able to change the 2 above fields mentionned.
Thanks for your collaboration!
Martin

The replay answer
Advertisement
Hi,
I'm doing it with transaction FB02. But I would like to do it with a BAPI and I'm looking for it. Are you sure there is not?
Anyway, this is my BDC code, you can get it doing a recording of the transaction you want in the SM35.
data: lt_bdcdata   type table of bdcdata,
         lwa_bdcdata  type bdcdata,
         lv_pos(2)    type n,
         lv_buzei(15) type c,
         lv_line      type i.
  define bdc_dynpro.
    clear lwa_bdcdata.
    lwa_bdcdata-program  = &1.
    lwa_bdcdata-dynpro   = &2.
    lwa_bdcdata-dynbegin = 'X'.
    append lwa_bdcdata to lt_bdcdata.
  end-of-definition.
  define bdc_field.
    clear lwa_bdcdata.
    lwa_bdcdata-fnam = &1.
    lwa_bdcdata-fval = &2.
    append lwa_bdcdata to lt_bdcdata.
  end-of-definition.
  bdc_dynpro 'SAPMF05L' '0100'.
  bdc_field  'BDC_OKCODE' '/00'.
  bdc_field  'RF05L-BELNR' if_belnr.
  bdc_field  'RF05L-BUKRS' if_bukrs.
  bdc_field  'RF05L-GJAHR' if_gjahr.
  if if_buzei <= 31.
    lv_pos = if_buzei.
  else.
    lv_line = if_buzei.
    while lv_line > 31.
      bdc_dynpro 'SAPMF05L' '0700'.
      bdc_field  'BDC_OKCODE' '=P+'.
      lv_line = lv_line - 31.
    endwhile.
    lv_pos = lv_line.
  endif.
  concatenate 'RF05L-ANZDT(' lv_pos ')' into lv_buzei.
  bdc_dynpro 'SAPMF05L' '0700'.
  bdc_field  'BDC_OKCODE' '=PK'.
  bdc_field  'BDC_CURSOR' lv_buzei.
  bdc_dynpro 'SAPMF05L' '0301'.
  bdc_field  'BDC_OKCODE' '=ZK'.
  bdc_dynpro 'SAPMF05L' '1301'.
  bdc_field  'BDC_OKCODE' '=ENTR'.
  bdc_field  'BSEG-ZLSCH' if_zlsch.
  bdc_dynpro 'SAPMF05L' '0301'.
  bdc_field  'BDC_OKCODE' '=AE'.
  call transaction 'FB02'  using lt_bdcdata
                           mode  if_mode
                           messages into et_msg.
Hope this helps you.
If anyone knows a BAPI for this, please tell me.
regards,
Ainara

Go to See the other 6 answers

Hot
I found that " Read it Later" and " Lat Pass" are inveriably opening webpages whenever I open Firefox. This is annoying. Being disgusted I have ultimately uninstalled Firefox - though I have been using it for over 5 years. Another poin [More]
Hi,  here's a link to the conundrum: http://theexperience-exchange.co.uk/stop.html This page (as are a few others) is based on a template document (stored in a Templates folder in the site root). I added an editable region in the form of a new div wi [More]
Hi Friends, i have an issue with AFAR recalculating the depreclation. The details are as below; 1. Asset value date is 15.07.2010. but ordinary dep. start date was set as 01.01.2010 manually by the user. 2. The Period control method 11, the dep. is c [More]
I have been working on a project and have green screen elements as well as pr keyed elements that I want to add to my film but am unable to figure out ow to do it. How do I add Green screen effects in iMovie 10.0.6?Have a look at http://help.apple.co [More]
Hi ,   Can any one suggest an alternative for the FM 'NAMETAB_GET' in 4.7. Regards ArunHi, You did noyt specify why you want this alternative for. Anyways, just check out RFC_GET_NAMETAB, which is also quite similar. Regards, Anand Mandalika.Read oth [More]
i want to generate image through test. means i wanto conert text in to image how can we do that. 2nd how can i generate BARCODE's is there any way to generate barcodes if we supply values ?Can u tell me any 3rd party tool Name ? i want to generate im [More]
Hi Gurus, I want to stop the user to change the limits in service PO after the service PO has been released and entry of service entry sheet. e.g. I have service PO with overall limit of 100K and it has been released. Now, user entered the service en [More]
Only NT and SUN Solaris JDBC drivers are available in the download area. Where I can download JDBC driver for AIX 8.1.7?What if you try deleting the /Library/Printer/EPSON and the/Library/Caches/Epson/ folders and then reinstalling the updates? The s [More]
I don't want to offend anyone. Please let me know if this post should be on itune or broken up for itune, iphoto and imovie. Trying to to complete this backing up process, but get it lean and clean before the final back up. As I looked closer at my a [More]
I am writing an add-on called Undo Close, for Firefox Mobile. It allows the user to reopen recently closed tabs. Currently, I provide an "Undo Close" button in the main menu (using the NativeWindow API). However, the ideal location for this butt [More]