Monday, 30 September 2024

Using Tcode DP95 for Create Sales Order from Service Order - subtitute tcode DP90 Using SM35 - Recording

   Tcode DP90 can not use for Batch Input and Background, Try Other tcode with some trick, Using variant Tcode DP95 for Uncheck Test Run because if this Checkbox is Tic, we can not create Sales Order



The Step are :
 - Createa Variant di DP95, Any Variant.
    Using SM35 to Recording Tcode DP95,

   Then get variant Program :

  Salesorder are SVO Number.


 constants c_space  type value cl_abap_char_utilities=>horizontal_tab.

******

  perform bdc_dynpro      using 'RVPKMASS' '1000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '/EGET'.
  perform bdc_field       using 'BDC_CURSOR'
                                'SO_VBELN-LOW'.
  perform bdc_dynpro      using 'SAPMSSY0' '0120'.
  perform bdc_field       using 'BDC_CURSOR'
                                '04/11'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=PICK'.
  perform bdc_dynpro      using 'RVPKMASS' '1000'.
  perform bdc_field       using 'BDC_CURSOR'
                                'SO_VBELN-LOW'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ONLI'.
  perform bdc_field       using 'SO_VBELN-LOW' ''.
  perform bdc_field       using 'P_FSPOS'
                                'X'.
  perform bdc_field       using 'SO_AUFNR-LOW'    salesorder.
  perform bdc_field       using 'P_DATETO'        g_date.
  perform bdc_field       using 'P_RRBFLT'        'X'.
  perform bdc_field       using 'P_SBELN'         'X'.
  perform bdc_field       using 'P_DETAIL'        'X'.
  perform bdc_dynpro      using 'RVPKMASS' '1000'.
  perform bdc_field       using 'BDC_CURSOR'
                                'SO_VBELN-LOW'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ONLI'.
  perform bdc_field       using 'SO_VBELN-LOW'  c_space.
*                                ''.
  perform bdc_field       using 'P_FSPOS'
                                'X'.
  perform bdc_field       using 'SO_AUFNR-LOW'   salesorder.
  perform bdc_field       using 'P_DATETO'       g_date.
  perform bdc_field       using 'P_RRBFLT'
                                'X'.
  perform bdc_field       using 'P_SBELN'
                                'X'.
  perform bdc_field       using 'P_DETAIL'
                                'X'.
  perform bdc_dynpro      using 'SAPMSSY0' '0120'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=EF03'.
  perform bdc_dynpro      using 'RVPKMASS' '1000'.
  perform bdc_field       using 'BDC_OKCODE'
                                '/EE'.
  perform bdc_field       using 'BDC_CURSOR'
                                'SO_VBELN-LOW'.
  perform bdc_transaction using 'DP95'.

***********************************************



















No comments:

Post a Comment

Visitor

Code Syntax Try...Endtry

  Code : Report Try. Parameters  NUMBER  type  I . data  RESULT  type  P  decimals  2 . data  OREF  type  ref  to  CX_ROOT . data  TEXT  typ...