Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all 10425 articles
Browse latest View live

Re: RV_CONDITION_COPY with Scales

$
0
0

Hi Peter,

 

See the below  code it is working for me. if you are not using suppliment conditions, you can remove the suppliment pricing procedure from the condition type.

 

Regards,

Murali Mikkili

 

 

Report Zxxxxx.

   *- Data
DATA: cr LIKE TABLE OF komv WITH HEADER LINE,
      key_fields LIKE TABLE OF komg WITH HEADER LINE,
      ls_komk TYPE komk,
      ls_komp TYPE komp,
      copy_staffel LIKE TABLE OF condscale WITH HEADER LINE,
      lt_knumh   TYPE STANDARD TABLE OF knumh_comp,
      t_komv_idoc LIKE TABLE OF komv_idoc WITH HEADER LINE.


*- Fill Key fields
CALL FUNCTION 'SD_CONDITION_KOMG_FILL'
  EXPORTING
    p_kotabnr = '304'
    p_kvewe   = 'A'
    p_vakey   = '100010F-01'
  IMPORTING
    p_komg    = key_fields.

*- Fill KOMK
MOVE-CORRESPONDING key_fields TO ls_komk.
ls_komk-mandt = sy-mandt.

*- Fill KOMP
MOVE-CORRESPONDING key_fields TO ls_komp.
ls_komp-kposn = '000001'.

*- Fill KOMV_IDOC
t_komv_idoc-kznep = 'X'.

APPEND t_komv_idoc.

*- Fill KOMV
cr-kappl = 'V'.
cr-kschl = 'PR00'.
cr-kbetr = '21'. " Unit Price
cr-krech = 'C'.
cr-kpein = '1'.
cr-kmein = 'EA'.
cr-waers = 'EUR'.
cr-knumh = '$000000001'.
cr-mandt = sy-mandt.

* Bellow are the important fields in KOMV for scales.
cr-kopos = 1.
cr-kzbzg = 'C'.
cr-konms = 'EA'.
cr-stfkz = 'A'.
APPEND cr.

* - Fill Scales
*- Scale Item 1
copy_staffel-klfn1      = '0001'.
copy_staffel-kopos      = '01'.
copy_staffel-kstbm      = '1'.
copy_staffel-kbetr      = '21'. " Scale Price
copy_staffel-kzbzg      = 'C'.
copy_staffel-rv13akonwa = 'EUR'.
copy_staffel-konpkmein  = 'EA'.
copy_staffel-konpkonms  = 'EA'.
APPEND copy_staffel.

*- Scales item 2
copy_staffel-klfn1      = '0002'.
copy_staffel-kopos      = '01'.
copy_staffel-kstbm      = '10'.
copy_staffel-kbetr      = '18'. " Scale Price
copy_staffel-kzbzg      = 'C'.
copy_staffel-rv13akonwa = 'EUR'.
copy_staffel-konpkmein  = 'EA'.
copy_staffel-konpkonms  = 'EA'.
APPEND copy_staffel.

*- Scales item 3
copy_staffel-klfn1      = '0003'.
copy_staffel-kopos      = '01'.
copy_staffel-kstbm      = '10'.
copy_staffel-kbetr      = '14'. " Scale Price
copy_staffel-kzbzg      = 'C'.
copy_staffel-rv13akonwa = 'EUR'.
copy_staffel-konpkmein  = 'EA'.
copy_staffel-konpkonms  = 'EA'.
APPEND copy_staffel.




CALL FUNCTION 'RV_CONDITION_COPY'
  EXPORTING
    application              = 'V'
    condition_table          = '304'
    condition_type           = 'PR00'
    date_from                = '20131101'
    date_to                  = '99991231'
    enqueue                  = 'X'
    i_komk                   = ls_komk
    i_komp                   = ls_komp
    key_fields               = key_fields
    maintain_mode            = 'A'
    no_authority_check       = 'X'
*    keep_old_records         = 'X'
    used_by_idoc             = 'X'      " when suppling scales prices, this flag must be X else price will be created with Zero price.
    overlap_confirmed        = 'X'
  TABLES
    copy_records             = cr
    copy_staffel             = copy_staffel
    copy_recs_idoc           = t_komv_idoc
  EXCEPTIONS
    enqueue_on_record        = 01
    invalid_application      = 02
    invalid_condition_number = 03
    invalid_condition_type   = 04
    no_authority_ekorg       = 05
    no_authority_kschl       = 06
    no_authority_vkorg       = 07
    no_selection             = 08
    table_not_valid          = 09.

BREAK-POINT.

CALL FUNCTION 'RV_CONDITION_SAVE'
  TABLES
    knumh_map = lt_knumh.
CALL FUNCTION 'RV_CONDITION_RESET'.

COMMIT WORK AND WAIT.


Re: Language not available on server

$
0
0

Hi,

 

There is nothing in screen shot.

It is showing error at bottom of screeen.

 

Regards,

Abdul

Re: Avoiding Hard coded user names in ABAP code

$
0
0

Hi Suba,

 

 

if sy-uname = 'XXXXX'.

do something.

end if.

 

the above code which u said is generally used to get easier during debuugging of code, but it not recommended to move the that code with those lines to production.

 

or i guess u can go with building ranges for usernames and check..

 

if sy-uname = r_usernames. ( r_usernames contain all the usernames)

do something.

end if.

 

thanks,

Azhar

Re: Problem related to bdc

$
0
0

The below values will not have any value

 

           id         = sy-msgid 

           number     = sy-msgno

           language   = sy-langu

           textformat = 'ASC'

           message_v1 = sy-msgv1

           message_v2 = sy-msgv2

           message_v3 = sy-msgv3

           message_v4 = sy-msgv4

 

You have to read the your message tab with Error type E and pass those message number and message type and message text to this FM.

Re: Restricting the Value of Search help in MIRO based on vendor

$
0
0

Hi Sreehari,

 

Please let me know how you solved this problem

 

Best Regards,

Bhaskar

Re: How to get association of a Z table to a Stad. SAP's Change Document Object - SCDO

$
0
0

Ah, so just adding Z struture is not enough (job done)? do i need to,

1) Regenerate the FMs (by clicking the Generate Update Pgm.)? and

2) change the code, whereever they (FMs) are calling? if so, they are calling in again standard SAP classes, so, do i need to change the standard SAP class as well? Hmmm

 

Thank you

Re: Get reference of in a class doesnot return why?

$
0
0

Hello Solen,

 

Please provide more details on how method TEST_DREF is populating the parameter EV_DREF.

 

Thank you,

Kim

Smartform is ok with print preview but prints with character problems

$
0
0

Hello guys,

 

 

I have developed a smartform and it worked Ok  when i have printed the smartform.

 

Till yesterday when users print the print shows with character deficiencies like illegal chars

writes like Courier 12..

 

But when you do a print preview it all looks ok

 

when you print and see the log at sp02 it gives errors like conversion

 

Character converter active when first problem occurred

 

 

Data was saved with character set 4103

Data will be converted to character set 1634 (synt = 9612)

 

 

Errors occurred processing this print request

 

  

OTF module: Unknown print control SPORT should be output

OTF module: Unknown print control SPAGE should be output

 

 

 

please help

 

screenshot attached!!!


Re: Smartform is ok with print preview but prints with character problems

$
0
0

Does it depend on which printer it is sent to?

Does it depend on who sends it?

Does it only happen or not happen with print LOCL?

 

Neal

Re: Get reference of in a class doesnot return why?

$
0
0

Hi Solen

 

Kim is right, your problem will be in your test_dref method. Please provide the coding within your test_dref method. ie.
Does your reference get created in the method?
CREATE DATA ev_dref.

 

Regards

Vic

Re: MATNR push as BIGINT to SQL table

$
0
0

Hi Praveen,

 

For BIGINT type variables you can use SAP's INTEGER64 data element. Create a variable and assign MATNR value to this variable when inserting to table.

Just don't forget that MATNR field is CHAR18 field and may contain non-numerical values. If there are non-numerical MATNR values, there is nothing you can do to insert those records to a table with BIGINT Material Code field.

 

 

Regards,

 

Murat Kaya

Re: Triggering of enhancement codes upon changes on certain field only

$
0
0

Hi Nicholas,

 

Currently I am not over my system, so I can't tell you the correct answer, but would request you to look into the following proposed solutions :

 

1. Check if system contains the unchanged value ( previous value ) in variable YVBAP, if yes, then you can put your piece in code inside If clause ( If YVBAP-posex_pruefe NE XVBAP-posex_pruefe ).

 

2. Otherwise you can also check, if there is some Exit in PBO, if yes, set unchanged value in memory and then again check for the changed variable in PAI block.

 

Hope it helps.

 

Thanking You All.

Re: Smartform is ok with print preview but prints with character problems

$
0
0

Hi Solen,

 

As per your problem description, I think there is some problem with Basis Configuration for the fonts and all that you have used in your output, in your development system.

 

Would request you to take help from Basis colleague for your team, he will be able to get the contrast between Dev. and Prod. servers.

 

Print preview is probably working fine, since print preview can take the relevant Styles and Font from Windows Environment but printing the output will not take it from Windows Environment.

 

Also, can you check the print output by providing your Spool No. in Report RSTXPDFT4.

 

Thanking You All.

types error

$
0
0

data : wa1 type tyva0301,

       it1 type table  of tyva0301.

 

 

data : wa2 type tyva0302,

       it2 type  table  of tyva0302.

 

 

data : wa3 type tyva0303,

       it3 type table of tyva0303.

 

when i try to run the program i had an error like this....between the TYPES BEGIN OF names and TYPES END OF names only types statments are allowed..........why i am getting this error...........?

Re: Bit Programming in ABAP

$
0
0

It seems, offsets can only be used for hexadecimal objects. Can It be used for decimal objects??

 

Example

 

The hexadecimal value "1B" is assigned to the data object hex and its bits are read from front to back. The output is "00011011", which corresponds to the binary display of decimal 27 or hexadecimal "1B".

 

DATA: len TYPE i,

      res TYPE i,

      hex TYPE xstring. 

hex = '1B'.

len =  XSTRLEN( hex ) * 8. 

WHILE sy-index <= len.

  GET BIT sy-index OF hex INTO res.

  WRITE (1) res NO-GAP.

ENDWHILE.

 

In the above example, I want to pass decimal value through hex variable(type p) and get desired result. Well, I don't think , It is possible through offsets. Is it?


Re: Bit Programming in ABAP

$
0
0

FF123456789JJ is not EPC Code.  To convert the given unique code (for e.g. FF123456789JJ) to EPC, basically i have to convert it to binary format. I can covert it to binary format through this way ...GIVEN UNIQUE CODE--->ASCII CODE(in decimal)--->BINARY FORMAT.So Is there any specific fm to convert decimal to binary in abap?

Re: How to get address of an variable in the ABAP debugger

Re: types error

$
0
0

Hello Sandeep,

 

When you are declaring structure using TYPES statement then in between the structure you cannot use DATA statement since TYPES does not allocate any memory but if you are using DATA then you can basically allocating memory to it.

 

For Example:

 

TYPES BEGIN OF t_test.

     DATA date TYPE sy-datum.

TYPES END OF t_test.

 

If you are declaring like above then you will get this error.

 

See this for reference: http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm

 

Regards,

Rahul

IDOC (Outbound and Inbound both) needs to be triggered in same system

$
0
0

Hello All,

 

I have a requirement where I need to create quotation (using VA21) and IDOC (outbound) needs to be generated automatically and then sales order (VA01) needs to be created automatically based on the quotation (Using inbound IDOC).

 

This whole process should happen in the same system and same client.

 

Can anyone have any idea how to achieve this?

 

Best Regards,

Rahul Gupta

Re: Is it possible to add E1EDKA3 under E1EDKA1 in Extended IDOC ZINVOIC02?

$
0
0

Hello Akshath,

 

It is not possible to add standard segment into any segment since the names are reserved. So, you need to create a custom segment (Starts with Y or Z) by making a copy of the E1EDKA3 and then you can insert it into E1EDKA1.

 

Regards,

Rahul

Viewing all 10425 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>