Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

SAP Exam C_ABAPD_2309 Topic 1 Question 14 Discussion

Actual exam question for SAP's C_ABAPD_2309 exam
Question #: 14
Topic #: 1
[All C_ABAPD_2309 Questions]

You have two internal tables itab1 and itab2.What is true for using the expression itab1 = corresponding #( itab2 )? Note: There are 2 correct answers to this question.

Show Suggested Answer Hide Answer
Suggested Answer: B, C

The expression itab1 = corresponding #( itab2 ) is a constructor expression with the component operator CORRESPONDING that assigns the contents of the internal table itab2 to the internal table itab1. The following statements are true for using this expression:

B: itab1 and itab2 must have at least one field name in common. This is because the component operator CORRESPONDING assigns the identically named columns of itab2 to the identically named columns of itab1 by default, according to the rules of MOVE-CORRESPONDING for internal tables.If itab1 and itab2 do not have any field name in common, the expression will not assign any value to itab1 and it will remain initial or unchanged1

C: Fields with the same name and the same type will be copied from itab2 to itab1. This is because the component operator CORRESPONDING assigns the identically named columns of itab2 to the identically named columns of itab1 by default, according to the rules of MOVE-CORRESPONDING for internal tables.If the columns have the same name but different types, the assignment will try to perform a conversion between the types, which may result in a loss of precision, a truncation, or a runtime error, depending on the types involved1

The following statements are false for using this expression:

A: Fields with the same name but with different types may be copied from itab2 to itab1. This is not true, as explained in statement C.The assignment will try to perform a conversion between the types, which may result in a loss of precision, a truncation, or a runtime error, depending on the types involved1

D: itab1 and itab2 must have the same data type. This is not true, as the component operator CORRESPONDING can assign the contents of an internal table of one type to another internal table of a different type, as long as they have at least one field name in common. The target type of the expression is determined by the left-hand side of the assignment, which is itab1 in this case.The expression will create an internal table of the same type as itab1 and assign it to itab11


Contribute your Thoughts:

Davida
4 months ago
So, B and C then? Everyone on board?
upvoted 0 times
...
Alise
4 months ago
Wait, so itab1 and itab2 don't have to have the same data type? That's interesting, I didn't know that. I'll go with B and C too.
upvoted 0 times
Eladia
4 months ago
User2: And fields with the same name and type will be copied over. So B and C are correct.
upvoted 0 times
...
Judy
4 months ago
User1: Yes, that's right. They just need to have at least one field name in common.
upvoted 0 times
...
...
In
4 months ago
C looks solid. Fields with the same name and type being copied seems correct.
upvoted 0 times
...
Delmy
4 months ago
Haha, I bet the developers who came up with this had a good laugh. 'Let's see if they can figure out the corresponding # part!' Anyway, I agree with B and C.
upvoted 0 times
Shaunna
3 months ago
Fields with the same name and the same type will be copied from itab2 to itab1.
upvoted 0 times
...
Shaun
3 months ago
Yeah, itab1 and itab2 must have at least one field name in common for it to work.
upvoted 0 times
...
Johnna
3 months ago
I think B and C are correct.
upvoted 0 times
...
...
Paris
4 months ago
Not sure about A. Different types might cause an issue.
upvoted 0 times
...
Marsha
5 months ago
This is a tricky one! I'm leaning towards B and C as well. Wouldn't want to accidentally copy mismatched data types, that could cause some serious issues!
upvoted 0 times
Arlie
4 months ago
B) itab1 and itab2 must have at least one field name in common.
upvoted 0 times
...
Maryann
4 months ago
C) Fields with the same name and the same type will be copied from itab2 to itab1.
upvoted 0 times
...
Ronald
4 months ago
B) itab1 and itab2 must have at least one field name in common.
upvoted 0 times
...
Glen
4 months ago
A) Fields with the same name but with different types may be copied from itab2 to itab1.
upvoted 0 times
...
Lindsey
4 months ago
B) itab1 and itab2 must have at least one field name in common.
upvoted 0 times
...
Hana
4 months ago
A) Fields with the same name but with different types may be copied from itab2 to itab1.
upvoted 0 times
...
Dorcas
4 months ago
A) Fields with the same name but with different types may be copied from itab2 to itab1.
upvoted 0 times
...
...
Maurine
5 months ago
Yeah, I agree with B. It makes sense that they need at least one common field name.
upvoted 0 times
...
Davida
5 months ago
I'm looking at options. B and C seem reasonable to me.
upvoted 0 times
...
Neethu
5 months ago
if it is different type also, it will copy, there wont be any kind of syntax errors. also if table field is char40 and the other is string, then copying from char40 to string is possible. without any truncation. Copying from string to char40 will not produce any syntax errors but if the length is more than 40 charcters , then it will truncate the data. I hope A & C are correct answers
upvoted 1 times
...
Aretha
6 months ago
Hmm, I'm not sure about A. Copying fields with different types seems risky to me. I'd go with B and C.
upvoted 0 times
Dyan
4 months ago
I agree, C is also true. It will copy fields with the same name and type.
upvoted 0 times
...
Dyan
5 months ago
I think B is correct. The tables must have at least one field name in common.
upvoted 0 times
...
...
Tamra
6 months ago
I think the correct answers are B and C. The fields must have the same name and type to be copied from itab2 to itab1.
upvoted 0 times
...
Jessenia
6 months ago
The question is quite technical. What do you guys think?
upvoted 0 times
...
Elbert
6 months ago
Yes, but they must have at least one field name in common too.
upvoted 0 times
...
Annice
6 months ago
So, fields with the same name and type will be copied.
upvoted 0 times
...
Elbert
6 months ago
I believe C is also true.
upvoted 0 times
...
Annice
6 months ago
I think A is true.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77