cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Control And Payment Card

Former Member
0 Kudos

Is there a way when you create a sales order in reference to another sales order, that if the 1st order has a credit card (or payment card) that it can copy into the new order. Instead of getting the message, The system will not copy card info from the reference document - Check . . . Message no. V/045 ??

Accepted Solutions (1)

Accepted Solutions (1)

former_member202002
Active Participant

Diane,

As many have mentioned, this is not standard functionality supported by the SD workflow. However, it is possible to add some ABAP code to a userexit to introduce this functionality. Here is an example:

*---------------------------------------------------------------------*
*       FORM USEREXIT_MOVE_FIELD_TO_VBAK                              *
*---------------------------------------------------------------------*
*       This userexit can be used to move some fields into the sales  *
*       dokument header workaerea VBAK.                               *
*                                                                     *
*       SVBAK-TABIX = 0:  Create header                               *
*       SVBAK-TABIX > 0:  Change header                               *
*                                                                     *
*       This form is called at the end of form VBAK_FUELLEN.          *
*                                                                     *
*---------------------------------------------------------------------*
form userexit_move_field_to_vbak.

* Paymetric sample example of COPY CARD NUMBERS BY REFERENCE

  data: l_rplnr  like vbak-rplnr,
        l_ccins  like fpltc-ccins,
        l_ccnum  like fpltc-ccnum,
        l_datab  like fpltc-datab,
        l_datbi  like fpltc-datbi,
        l_ccname like fpltc-ccname,
        l_fakwr  like fplt-fakwr.

  constants: c_new_rplnr like vbak-rplnr value '$000000001'.

* Find the reference document payment card billing plan number
  if not cvbak-rplnr is initial.
    l_rplnr = cvbak-rplnr.
  elseif not cvbrk-rplnr is initial.
    l_rplnr = cvbrk-rplnr.
  endif.

* Continue if a payment card billing plan exists on reference document
  if not l_rplnr is initial.

* Read the payment card billing plan from the reference document
    call function 'BILLING_SCHEDULE_READ'
         exporting
              fplnr = l_rplnr
         tables
              zfpla = xfpla
              zfplt = xfplt.

* Reset the payment card billing plan and change update indicator to 'I'
    loop at xfpla.
      clear xfpla-vbeln.
      xfpla-fplnr = c_new_rplnr.
      xfpla-updkz = 'I'.
      modify xfpla.
    endloop.

* Reset the payment card billing plan and the parent/child plan number
* as well as change update indicator to 'I'
    loop at xfplt.

* Copying from an Order Document
      if not cvbak-rplnr is initial.

* Do not copy RESPONSE lines from Order document - delete those entries
        if not xfplt-uelnr is initial.
          delete xfplt.
          continue.
        endif.

* Copying from a Billing Document
      elseif not cvbrk-rplnr is initial.

* Reset the billing plan line item number to a non-RESPONSE number
        xfplt-fpltr = sy-tabix.

* Clear all RESPONSE related fields
        clear: xfplt-autwr,
               xfplt-fksaf,
               xfplt-uelnr,
               xfplt-ueltr,
               xfplt-aunum,
               xfplt-autra,
               xfplt-audat,
               xfplt-autim,
               xfplt-ccall,
               xfplt-react,
               xfplt-ueltr_a,
               xfplt-rcavr,
               xfplt-rcava,
               xfplt-rcavz,
               xfplt-rcrsp,
               xfplt-rtext,
               xfplt-rccvv,
               xfplt-cvval,
               xfplt-cvvct,
               xfplt-cvvst.

      endif.

* Remove Maximum amounts if set in Source Order document
*      CLEAR XFPLT-FAKWR.

* Reset the payment card billing plan number in table
      xfplt-fplnr = c_new_rplnr.

* Set the update indicator to "INSERT"
      xfplt-updkz = 'I'.

      modify xfplt.

    endloop.

    clear: xfpla,
           xfplt.

* Reset the payment card billing plan number for this document
    vbak-rplnr = c_new_rplnr.

  endif.

*  vbak-zzfield = xxxx-zzfield2.

endform.
*eject

This will allow the card numbers to be copied, but will not remove SAP's message about not copying the cards. If you'd like to do that you'll have to make a copy of the copy control routine that raises the message and change the code - perhaps similar to this:

* Payment Cards "CCARD
* Check number of payment card plan type
   IF NOT VBAK-RPLNR IS INITIAL. "CCARD
     MESSAGE W045(V/). "CCARD 
   ENDIF. "CCARD

to appear as follows:

* Remove the credit card copy message
* Payment Cards "CCARD
* Check number of payment card plan type
*    IF NOT VBAK-RPLNR IS INITIAL. "CCARD
*      MESSAGE W045(V/). "CCARD
   MESSAGE I899(SD) WITH 'Payment card details copied - please review!'.
*    ENDIF. "CCARD

* Remove the credit card copy message

Feel free to use this code and modify it to meet your specific business needs.

Regards,

Eric Bushman

VP, Solutions Engineering

Paymetric

Answers (3)

Answers (3)

ian_kehoe
Active Participant
0 Kudos

Hello Diane,

Unfortunately this is not possible in the standard system. The system was designed this way for security reasons.

There is no way to do this in the standard system.

Best regards,

Ian Kehoe

Former Member
0 Kudos

Is there Standard SAP code to do this?

Former Member
0 Kudos

This is possible through Abap development. A new routine requires to be coded, which should include the standard features of existing routine and also logic to copy the details of Credit Card (or Payment Card) from referncing Sales Order.

Regards,

Rajesh Banka